- Feb 07, 2013
-
-
Dmitri Gribenko authored
llvm-svn: 174613
-
Dmitri Gribenko authored
llvm-svn: 174612
-
NAKAMURA Takumi authored
llvm-svn: 174606
-
Manuel Klimek authored
This is a powerful tool when doing iterative refined matches, where another match is started inside the match callback of the first one; this allows for example to find out whether the node was in the condition or body of its parent if-statement. llvm-svn: 174605
-
Guy Benyei authored
llvm-svn: 174601
-
Nick Lewycky authored
operators. llvm-svn: 174584
-
Richard Smith authored
name lookup has been performed in that context (this probably only happens in C++). 1) Whenever we add names to a context, set a flag on it, and if we perform lookup and discover that the context has had a lookup table built but has the flag set, update all entries in the lookup table with additional names from the external source. 2) When marking a DeclContext as having external visible decls, mark the context in which lookup is performed, not the one we are adding. These won't be the same if we're adding another copy of a pre-existing namespace. llvm-svn: 174577
-
Richard Smith authored
if it found any decls, rather than returning a list of found decls. This removes a returning-ArrayRef-to-deleted-storage bug from MultiplexExternalSemaSource (in code not exercised by any of the clang binaries), reduces the work required in the found-no-decls case with PCH, and importantly removes the need for DeclContext::lookup to be reentrant. No functionality change intended! llvm-svn: 174576
-
Alexander Kornienko authored
-Wimplicit-fallthrough: fixed two cases where "fallthrough annotation in unreachable code" was issued incorrectly. Summary: -Wimplicit-fallthrough: fixed two cases where "fallthrough annotation in unreachable code" was issued incorrectly: 1. In actual unreachable code, but not immediately on a fall-through execution path "fallthrough annotation does not directly precede switch label" is better; 2. After default: in a switch with covered enum cases. Actually, these shouldn't be treated as unreachable code for our purpose. Reviewers: rsmith Reviewed By: rsmith CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D374 llvm-svn: 174575
-
Fariborz Jahanian authored
metadata to handle ivar bitfields. This is wip. // rdar://13138459 llvm-svn: 174573
-
Richard Smith authored
indicate the semantic DC if it's not the lexical DC. In passing, correct the ascii-art child marker for a child of a FriendDecl. llvm-svn: 174570
-
Douglas Gregor authored
Be a little more permissive with -fmodules-ignore-macro= by removing everything after the second '=' if it is there. llvm-svn: 174567
-
Richard Smith authored
llvm-svn: 174565
-
Douglas Gregor authored
The use of this flag enables a modules optimization where a given set of macros can be labeled as "ignored" by the modules system. Definitions of those macros will be completely ignored when building the module hash and will be stripped when actually building modules. The overall effect is that this flag can be used to drastically reduce the number of Eventually, we'll want modules to tell us what set of macros they respond to (the "configuration macros"), and anything not in that set will be excluded. However, that requires a lot of per-module information that must be accurate, whereas this option can be used more readily. Fixes the rest of <rdar://problem/13165109>. llvm-svn: 174560
-
Nico Weber authored
Slightly expand the boxed expressions test with a few more snippets from http://clang.llvm.org/docs/ObjectiveCLiterals.html llvm-svn: 174559
-
- Feb 06, 2013
-
-
Douglas Gregor authored
This can happen when one abuses precompiled headers by passing more -D options when using a precompiled hedaer than when it was built. This is intentionally permitted by precompiled headers (and is exploited by some build environments), but causes problems for modules. First part of <rdar://problem/13165109>, detecting when something when horribly wrong. llvm-svn: 174554
-
Daniel Jasper authored
Before: const char *test[] = { // A "aaaa", // B "aaaaa", }; After: const char *test[] = { // A "aaaa", // B "aaaaa", }; llvm-svn: 174549
-
Daniel Jasper authored
Assign a high penalty to breaking before "<<" if the previous token is a string literal ending in ":" or "=". Before: llvm::outs() << "aaaaaaaaaaaaaaaaa = " << aaaaaaaaaaaaaaaaa << "bbbbbbbbbbbbbbbbb = " << bbbbbbbbbbbbbbbbb << "ccccccccccccccccc = " << ccccccccccccccccc << "ddddddddddddddddd = " << ddddddddddddddddd << "eeeeeeeeeeeeeeeee = " << eeeeeeeeeeeeeeeee; After: llvm::outs() << "aaaaaaaaaaaaaaaaa = " << aaaaaaaaaaaaaaaaa << "bbbbbbbbbbbbbbbbb = " << bbbbbbbbbbbbbbbbb << "ccccccccccccccccc = " << ccccccccccccccccc << "ddddddddddddddddd = " << ddddddddddddddddd << "eeeeeeeeeeeeeeeee = " << eeeeeeeeeeeeeeeee; llvm-svn: 174545
-
Manuel Klimek authored
This is in preparation for adding other overloaded matchers. This change alone is a net win in LOC. I went through all matchers and looked whether we could now encode them as macro, or simplify them with the matcher atoms that were not available before. llvm-svn: 174540
-
Daniel Jasper authored
llvm-svn: 174537
-
Ted Kremenek authored
and for those we care about we should have a general way of testing them. llvm-svn: 174531
-
Jordan Rose authored
This was GCC's option to turn on UCN support, which we always have on now in C99 and C++ modes. Additionally, mark the -fno-extended-identifiers option as unsupported, since we don't support disabling UCNs in C99 and C++ modes. PR11538 llvm-svn: 174530
-
Douglas Gregor authored
Essentially, a module file on disk could change size between the time we stat() it and the time we open it, and we need to be robust against such a problem. llvm-svn: 174529
-
Nico Weber authored
llvm-svn: 174521
-
Manuel Klimek authored
We now correctly format: // Written as a macro, it is reformatted from: #define foo(a) \ do { \ /* Initialize num to zero. */ \ int num = 10; \ /* This line ensures a is never zero. */ \ int i = a == 0 ? 1 : a; \ i = num / i; /* This division is OK. */ \ return i; \ } while (false) llvm-svn: 174517
-
Manuel Klimek authored
We now leave the semicolon in the line of the closing brace in: namespace { ... }; llvm-svn: 174514
-
Daniel Jasper authored
This fixes llvm.org/PR15165. We now correctly align: [image_rep drawInRect:drawRect fromRect:NSZeroRect operation:NSCompositeCopy fraction:1.0 ssssssssdd:NO hints:nil]; llvm-svn: 174513
-
Manuel Klimek authored
This is pretty common in macros: #define A(X, Y) class X##Y {}; llvm-svn: 174512
-
Daniel Jasper authored
This fixes llvm.org/PR15162. Before: bool aaaaaaaaaaaaa = // comment aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || aaaaaaaaaaaaaaaaaaaaaaaaaaaa || aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || aaaaaaaaaaaaaaaaaaaaaaaaaaaaa; After: bool aaaaaaaaaaaaa = // comment aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || aaaaaaaaaaaaaaaaaaaaaaaaaaaa || aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || aaaaaaaaaaaaaaaaaaaaaaaaaaaaa; llvm-svn: 174508
-
Daniel Jasper authored
With this patch, clang-format can analyze the input file for two properties: 1. Is "int *a" or "int* a" more common. 2. Are non-C++03 constructs used, e.g. A<A<A>>. With Google-style, clang-format will now use the more common style for (1) and format C++03 compatible, unless it finds C++11 constructs in the input. llvm-svn: 174504
-
Daniel Jasper authored
Before: void f(int *a = d *e, int b = 0); After: void f(int *a = d * e, int b = 0); llvm-svn: 174500
-
Manuel Klimek authored
A very common use case is to search for the first occurrence of a certain node that is a descendant of another node. In that case, selectFirst significantly simplifies the code at the client side. llvm-svn: 174499
-
Daniel Jasper authored
Properly handle annotation contexts while calculating extra information for each token. This enable nested ObjC calls and thus solves (most of) llvm.org/PR15164. E.g., we can now format: [contentsContainer replaceSubview:[subviews objectAtIndex:0] with:contentsNativeView]; Also fix a problem with the formatting of types in casts as this was trivial now. llvm-svn: 174498
-
Nico Weber authored
1. let determineStarAmp() check of unary operators before checking for "is next '['". That check was added in r173150, and the test from that revision passes either way. 2. change determineStarAmp() to categorize '*' and '&' after '=' as unary operator. 3. don't let parseSquare() overwrite the type of a '*' or '&' before the start of an objc message expression if has the role of unary operator. llvm-svn: 174489
-
Nick Lewycky authored
we already checked it when parsing. llvm-svn: 174486
-
Chad Rosier authored
rdar://13153516 llvm-svn: 174477
-
Daniel Dunbar authored
- The trickery can confuse more basic source processors, in particular the Unix conformance tool that wants to scan headers. llvm-svn: 174475
-
Michael Gottesman authored
\end paranoia. llvm-svn: 174471
-
Anna Zaks authored
This is a "quick fix". The underlining issue is that when a const pointer to a struct is passed into a function, we do not invalidate the pointer fields. This results in false positives that are common in C++ (since copy constructors are prevalent). (Silences two llvm false positives.) llvm-svn: 174468
-
Renato Golin authored
llvm-svn: 174466
-