| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For "int i = NULL;" we would produce:
null.cpp:5:11: warning: implicit conversion of NULL constant to integer [-Wconversion]
int i = NULL;
~ ^~~~
null.cpp:1:14: note: expanded from macro 'NULL'
\#define NULL __null
^~~~~~
But we really shouldn't trace that macro expansion back into the header, yet we
still want macro back traces for code like this:
\#define FOO NULL
int i = FOO;
or
\#define FOO int i = NULL;
FOO
While providing appropriate tagging at different levels of the expansion, etc.
The included test case exercises these cases & does some basic validation (to
ensure we don't have macro expansion notes where we shouldn't, and do where we
should) - but doesn't go as far as to validate the source location/ranges
used in those notes and warnings.
llvm-svn: 152940
|
| |
|
|
|
|
| |
This fixes g++.dg/parse/friend5.C.
llvm-svn: 152938
|
| |
|
|
| |
llvm-svn: 152931
|
| |
|
|
|
|
|
|
| |
This fixes PR 4307.
Patch by Eitan Adler!
llvm-svn: 152918
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Enable incremental parsing by the Preprocessor,
where more code can be provided after an EOF.
It mainly prevents the tearing down of the topmost lexer.
To be used like this:
PP.enableIncrementalProcessing();
while (getMoreSource()) {
while (Parser.ParseTopLevelDecl(ADecl)) {...}
}
PP.enableIncrementalProcessing(false);
llvm-svn: 152914
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reintroduce lazy name lookup table building, ensuring that the lazy building step
produces the same lookup table that would be built by the eager step.
Avoid building a lookup table for the translation unit outside C++, even in cases
where we can't recover the contents of the table from the declaration chain on
the translation unit, since we're not going to perform qualified lookup into it
anyway. Continue to support lazily building such lookup tables for now, though,
since ASTMerge uses them.
In my tests, this performs very similarly to ToT with r152608 backed out, for C,
Obj-C and C++, and does not suffer from PR10447.
llvm-svn: 152905
|
| |
|
|
| |
llvm-svn: 152900
|
| |
|
|
|
|
| |
aren't supported at the moment. PR12040.
llvm-svn: 152891
|
| |
|
|
|
|
| |
rdar://10673816
llvm-svn: 152879
|
| |
|
|
| |
llvm-svn: 152878
|
| |
|
|
|
|
| |
statements.
llvm-svn: 152875
|
| |
|
|
|
|
| |
storage class, the asm name doesn't specify a register. PR12244.
llvm-svn: 152873
|
| |
|
|
|
|
| |
well.
llvm-svn: 152868
|
| |
|
|
| |
llvm-svn: 152867
|
| |
|
|
|
|
|
| |
the behavior of gcc with respect to the -fno-inline and -fno-inline-functions
flags.
llvm-svn: 152861
|
| |
|
|
|
|
|
|
| |
expressions with a "base object", because the CFG is now linearized.
The only use of AggExprVisitor was in #if 0 code (the analyzer's incomplete C++ support), so there is no actual behavioral change anyway.
llvm-svn: 152856
|
| |
|
|
| |
llvm-svn: 152848
|
| |
|
|
| |
llvm-svn: 152839
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BugVisitor DiagnosticPieces.
When checkers create a DiagnosticPieceEvent, they can supply an extra
string, which will be concatenated with the call exit message for every
call on the stack between the diagnostic event and the final bug report.
(This is a simple version, which could be/will be further enhanced.)
For example, this is used in Malloc checker to produce the ",
which allocated memory" in the following example:
static char *malloc_wrapper() { // 2. Entered call from 'use'
return malloc(12); // 3. Memory is allocated
}
void use() {
char *v;
v = malloc_wrapper(); // 1. Calling 'malloc_wrappers'
// 4. Returning from 'malloc_wrapper', which allocated memory
} // 5. Memory is never released; potential
memory leak
llvm-svn: 152837
|
| |
|
|
| |
llvm-svn: 152835
|
| |
|
|
| |
llvm-svn: 152830
|
| |
|
|
|
|
|
|
|
|
|
| |
This allows us to handle extreme cases of chained binary operators without causing stack
overflow.
The binary operators that are handled with the data recursive evaluator are
comma, logical, or operators that have operands with integral or enumeration type.
Part of rdar://10941790.
llvm-svn: 152819
|
| |
|
|
| |
llvm-svn: 152818
|
| |
|
|
|
|
| |
for @protocol expression into their own section.
llvm-svn: 152808
|
| |
|
|
|
|
|
|
|
| |
the external source to complete the Decl if it
hasn't been completed already.
This fixes a crash in LLDB.
llvm-svn: 152807
|
| |
|
|
|
|
| |
Patch thanks to Nikola Smiljanic
llvm-svn: 152801
|
| |
|
|
|
|
| |
Patch by Silviu Baranga!
llvm-svn: 152788
|
| |
|
|
|
|
|
|
| |
breaking bootstrap. No test yet: it's quite hard to tickle the failure case.
The specific testcase for this wouldn't be useful for testing anything more
general than a reintroduction of this precise bug in any case.
llvm-svn: 152775
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Original commit message:
Provide -Wnull-conversion separately from -Wconversion.
Like GCC, provide a NULL conversion to non-pointer conversion as a separate
flag, on by default. GCC's flag is "conversion-null" which we provide for
cross compatibility, but in the interests of consistency (with
-Wint-conversion, -Wbool-conversion, etc) the canonical Clang flag is called
-Wnull-conversion.
Patch by Lubos Lunak.
Review feedback by myself, Chandler Carruth, and Chad Rosier.
llvm-svn: 152774
|
| |
|
|
|
|
| |
computing expr source...", it breaks bootstrap.
llvm-svn: 152772
|
| |
|
|
|
|
| |
getDeclSpecContextFromDeclaratorContext.
llvm-svn: 152766
|
| |
|
|
|
|
|
| |
Abbreviated commit message:
Provide -Wnull-conversion separately from -Wconversion.
llvm-svn: 152765
|
| |
|
|
|
|
|
|
|
|
| |
locations for diagnostics we're not going to emit, and don't track the subobject
designator outside C++11 (since we're not going to use it anyway).
This seems to give about a 0.5% speedup on 403.gcc/combine.c, but the results
were sufficiently noisy that I can't reject the null hypothesis.
llvm-svn: 152761
|
| |
|
|
| |
llvm-svn: 152758
|
| |
|
|
|
|
|
|
|
|
|
| |
-fno-inline-functions.
This behaves much like -fno-inline in gcc, but based on a discussion with
Daniel it was decided that -fno-inline-functions should subsume -fno-inline.
Please speak up if you object. The -fno-inline flag remains ignored.
Final part of rdar://10972766
llvm-svn: 152754
|
| |
|
|
|
|
| |
and metadata for "non-lazy" class and categories.
llvm-svn: 152751
|
| |
|
|
|
|
|
|
| |
scoped enumeration members. Later uses of an enumeration temploid as a nested
name specifier should cause its instantiation. Plus some groundwork for
explicit specialization of member enumerations of class templates.
llvm-svn: 152750
|
| |
|
|
|
|
|
| |
(Why are we keeping all of this code around anyway? Say the word and I'll
start swinging the delete hammer.)
llvm-svn: 152749
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Like GCC, provide a NULL conversion to non-pointer conversion as a separate
flag, on by default. GCC's flag is "conversion-null" which we provide for
cross compatibility, but in the interests of consistency (with
-Wint-conversion, -Wbool-conversion, etc) the canonical Clang flag is called
-Wnull-conversion.
Patch by Lubos Lunak.
Review feedback by myself, Chandler Carruth, and Chad Rosier.
llvm-svn: 152745
|
| |
|
|
|
|
| |
for misc. objc meta-data.
llvm-svn: 152743
|
| |
|
|
| |
llvm-svn: 152740
|
| |
|
|
|
|
| |
qualified name lookups into transparent contexts.
llvm-svn: 152739
|
| |
|
|
| |
llvm-svn: 152738
|
| |
|
|
|
|
| |
in the callee.
llvm-svn: 152734
|
| |
|
|
|
|
|
| |
Add the _class_ro_t.reserved field for 64bit targets.
// rdar://11040024
llvm-svn: 152731
|
| |
|
|
|
|
| |
MaterializeTemporaryExpr.
llvm-svn: 152730
|
| |
|
|
| |
llvm-svn: 152725
|
| |
|
|
| |
llvm-svn: 152721
|
| |
|
|
|
|
| |
longer needed as the CFG is fully linearized.
llvm-svn: 152720
|
| |
|
|
|
|
|
|
|
|
| |
- As with DiagnosticBuilder, it is very important that SemaDiagnosticBuilder be
completely inline to ensure that the compiler can rip it apart and sink it to
registers.
This is good for another 30k reduction in code size.
llvm-svn: 152708
|