| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
modern meta-data abi translation. Still wip.
// rdar://13138459
llvm-svn: 174672
|
|
|
|
| |
llvm-svn: 174662
|
|
|
|
|
|
| |
visible <rdar://problem/13172858>.
llvm-svn: 174648
|
|
|
|
|
|
| |
consistency.
llvm-svn: 174645
|
|
|
|
|
|
| |
in an unevaluated context.
llvm-svn: 174644
|
|
|
|
|
|
| |
OpenCL builtin functions.
llvm-svn: 174630
|
|
|
|
|
|
| |
restrictions.
llvm-svn: 174601
|
|
|
|
|
|
| |
operators.
llvm-svn: 174584
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
metadata to handle ivar bitfields. This is wip.
// rdar://13138459
llvm-svn: 174573
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
everything after the second '=' if it is there.
llvm-svn: 174567
|
|
|
|
| |
llvm-svn: 174565
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
modules.
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
const char *test[] = {
// A
"aaaa",
// B
"aaaaa",
};
After:
const char *test[] = {
// A
"aaaa",
// B
"aaaaa",
};
llvm-svn: 174549
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 174537
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 174521
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
We now leave the semicolon in the line of the closing brace in:
namespace {
...
};
llvm-svn: 174514
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
This is pretty common in macros:
#define A(X, Y) class X##Y {};
llvm-svn: 174512
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes llvm.org/PR15162.
Before:
bool aaaaaaaaaaaaa = // comment
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || aaaaaaaaaaaaaaaaaaaaaaaaaaaa ||
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ||
aaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
After:
bool aaaaaaaaaaaaa = // comment
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || aaaaaaaaaaaaaaaaaaaaaaaaaaaa ||
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || aaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
llvm-svn: 174508
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Before: void f(int *a = d *e, int b = 0);
After: void f(int *a = d * e, int b = 0);
llvm-svn: 174500
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
we already checked it when parsing.
llvm-svn: 174486
|
|
|
|
|
|
| |
rdar://13153516
llvm-svn: 174477
|
|
|
|
|
|
|
| |
- The trickery can confuse more basic source processors, in particular the
Unix conformance tool that wants to scan headers.
llvm-svn: 174475
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 174466
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
SELECTOR_REFERENCES in both the fragile and non-fragile API.
This is to ensure that GlobalOpt in LLVM does not attempt to look through a
selector reference to a method var name at compile time.
I also added a test/updated old tests that need to recognize the new keyword.
rdar://12580965.
llvm-svn: 174461
|
|
|
|
| |
llvm-svn: 174449
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a more natural order of evaluation, and it is very important
for visualization in the static analyzer. Within Xcode, the arrows
will not jump from right to left, which looks very visually jarring.
It also provides a more natural location for dataflow-based diagnostics.
Along the way, we found a case in the analyzer diagnostics where we
needed to indicate that a variable was "captured" by a block.
-fsyntax-only timings on sqlite3.c show no visible performance change,
although this is just one test case.
Fixes <rdar://problem/13016513>
llvm-svn: 174447
|
|
|
|
|
|
|
|
| |
(void*)p.
Addresses the false positives similar to the test case.
llvm-svn: 174436
|
|
|
|
| |
llvm-svn: 174435
|
|
|
|
|
|
| |
rdar://13140508
llvm-svn: 174386
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
preprocessor options;
since only one of them is allowed in command-line, process them separately.
Otherwise, if more than one is specified in the command-line, one is processed normally
and the others are going to be treated and included as header files.
Related to radar://13140508
llvm-svn: 174385
|
|
|
|
| |
llvm-svn: 174384
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We can now format stuff like:
- (void)doSomethingWith:(GTMFoo *)theFoo
rect:(NSRect)theRect
interval:(float)theInterval {
[myObject doFooWith:arg1 //
name:arg2
error:arg3];
}
This seems to fix everything mentioned in llvm.org/PR14939.
llvm-svn: 174364
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
f(aaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaa +
aaaaaaaaaaaaaaaaaaaa);
aaaaaaa(aaaaaaaaaaaaa, aaaaaaaaaaaaa, aaaaaaaaaaaaa(aaaaaaaaaaaaaaaaa,
aaaaaaaaaaaaaaaa));
After:
f(aaaaaaaaaaaaaaaaaaaa,
aaaaaaaaaaaaaaaaaaaa,
aaaaaaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaaaaaa);
aaaaaaa(aaaaaaaaaaaaa,
aaaaaaaaaaaaa,
aaaaaaaaaaaaa(aaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaa));
llvm-svn: 174363
|
|
|
|
|
|
|
|
|
|
| |
In preprocessor definitions, we would not parse all the tokens and thus
not annotate them anymore. This led to a wrong formatting of comments
in google style:
#endif // HEADER_GUARD -- requires two spaces
llvm-svn: 174361
|
|
|
|
| |
llvm-svn: 174359
|
|
|
|
|
|
| |
[-Wsign-compare]
llvm-svn: 174353
|
|
|
|
|
|
| |
the DWARF5 split dwarf proposal.
llvm-svn: 174349
|