Chris Lattner
bd6e69368f
enhance ASTContext::GetBuiltinType to return a bitmask indicating which arguments
...
are required to be ICE's. No clients of this new functionality yet!
llvm-svn: 115366
2010-10-01 22:53:11 +00:00
Chris Lattner
dc226c2b9b
random cleanups, no functionality change.
...
llvm-svn: 115361
2010-10-01 22:42:38 +00:00
Gabor Greif
16e028617c
Factor out enumerator APSInt adjustment into
...
a helper function (AdjustAPSInt) and use that
for adjusting the high bounds of case ranges
before APSInt comparisons. Fixes
http://llvm.org/bugs/show_bug.cgi?id=8135
Some minor refacorings while I am here.
llvm-svn: 115355
2010-10-01 22:05:14 +00:00
Francois Pichet
6d76e6cd92
Better diagnostic for superfluous scope specifier inside a class definition for member functions. + Fixit.
...
Example:
class A {
void A::foo(); //warning: extra qualification on member 'foo'
};
llvm-svn: 115347
2010-10-01 21:19:28 +00:00
Tom Care
7359459636
UnreachableCodeChecker does not need to inherit from CheckerVisitor, only Checker. It does not use any AST Stmt hooks, only VisitEndAnalysis.
...
llvm-svn: 115345
2010-10-01 20:52:07 +00:00
Douglas Gregor
36ea4d4f45
Revert r115336 ("Thread PerFileData through everything."), because
...
we're missing the corresponding changes in the LLVM repository.
llvm-svn: 115340
2010-10-01 20:33:34 +00:00
Sebastian Redl
7b1b2268e2
Thread PerFileData through everything. This allows us to remap stuff later.
...
llvm-svn: 115336
2010-10-01 19:59:15 +00:00
Sebastian Redl
3f6b753f9d
Record module loaders and module source order.
...
llvm-svn: 115334
2010-10-01 19:59:12 +00:00
Douglas Gregor
7fb25418ed
Implement the C++0x "trailing return type" feature, e.g.,
...
auto f(int) -> int
from Daniel Wallin!
(With a few minor bug fixes from me).
llvm-svn: 115322
2010-10-01 18:44:50 +00:00
Chris Lattner
8473339100
Various builtins a require an integer constant. Not providing
...
one results in an obscure error from the backend that doesn't make
sense. Capture this information in the .def files for builtins with
a new "I" modifier letter indicating the an argument needs to be an ICE.
Nothing uses this yet, but sema will eventually enforce this (eliminating
some special cases from semachecking.cpp) and codegen will use this to
force an ICE value, preventing backend error messages.
llvm-svn: 115302
2010-10-01 07:13:18 +00:00
Chris Lattner
1750cb037d
__builtin_ia32_psrldqi128 too
...
llvm-svn: 115301
2010-10-01 06:58:49 +00:00
Chris Lattner
81f347fe6d
the second argument to __builtin_ia32_pslldqi128 must be an immediate,
...
so it needs to be called from a macro, not a function. This is a necessary
but insufficient step towards fixing PR8221
llvm-svn: 115299
2010-10-01 06:52:23 +00:00
Zhongxing Xu
b06a2cdd2b
Now the whether adding implicit dtors is controlled by cmd option.
...
llvm-svn: 115275
2010-10-01 03:31:06 +00:00
Zhongxing Xu
6d372f7c0f
The return value is never used.
...
llvm-svn: 115272
2010-10-01 03:22:39 +00:00
Zhongxing Xu
307701e1b4
Use default augument.
...
llvm-svn: 115271
2010-10-01 03:09:09 +00:00
Zhongxing Xu
81714f2196
Simplify interface for addLocalScopeForStmt().
...
llvm-svn: 115270
2010-10-01 03:00:16 +00:00
Zhongxing Xu
ea360a3b1a
The old logic would add non-struct and non C++ struct variables to the local
...
scope. Now we only add C++ struct with non-trivial destructor variables to the
local scope.
llvm-svn: 115269
2010-10-01 02:47:11 +00:00
Marcin Swiderski
3546b1aea1
Added generating CFGAutomaticObjDtors for exception variable in catch statement.
...
llvm-svn: 115266
2010-10-01 01:46:52 +00:00
Marcin Swiderski
6d5ee0c7f9
Added generating CFGAutomaticObjDtors for init statement, condition variable and implicit scope in for statement.
...
llvm-svn: 115265
2010-10-01 01:38:14 +00:00
Marcin Swiderski
e407a3ba1e
dded generating CFGAutomaticObjDtors for condition variable and implicit scopes in switch statement.
...
llvm-svn: 115264
2010-10-01 01:24:41 +00:00
Douglas Gregor
aa43301842
If we get a TU_CONTEXT update from a chained PCH file before we
...
actually have an ASTContext, delay the processing of that
update. Patch by Sebastian Redl! Fixes <rdar://problem/8499034>.
llvm-svn: 115263
2010-10-01 01:18:02 +00:00
Marcin Swiderski
1f4e15c56f
Added generating CFGAutomaticObjDtors for condition variable and implicit scopes in while and do statements.
...
llvm-svn: 115262
2010-10-01 01:14:17 +00:00
Douglas Gregor
9e136b544d
Enable chained precompiled headers for use with precompiled preambles
...
llvm-svn: 115260
2010-10-01 01:05:22 +00:00
Douglas Gregor
eb114da506
When an identifier that has a macro definition in the original PCH
...
file is somehow changed in a chained PCH file, make sure that we write
out the macro definition. Fixes part of <rdar://problem/8499034>.
llvm-svn: 115259
2010-10-01 01:03:07 +00:00
Marcin Swiderski
f883ade880
Added generating CFGAutomaticObjDtors for condition variable and implicit scopes in if statement.
...
llvm-svn: 115256
2010-10-01 00:52:17 +00:00
Marcin Swiderski
e84cb97997
Fixed checking for trivial destructor in CFGBuilder::addLocalScopeForVarDecl. Checked type does not have to represent C++ class.
...
llvm-svn: 115254
2010-10-01 00:31:22 +00:00
Marcin Swiderski
667ffecd9e
Added:
...
- Adding LocalScope for CompoundStmt,
- Adding CFGAutomaticObjDtors for end of scope, return, goto, break, continue,
- Regression tests for above cases.
llvm-svn: 115252
2010-10-01 00:23:17 +00:00
Fariborz Jahanian
885e9dff93
Output debug info. for ivars declared in class
...
extension and implementation.
Fixes rdar://8493239.
llvm-svn: 115248
2010-10-01 00:01:53 +00:00
Dale Johannesen
39d6f4b95c
Clang part of MMX rewrite (goes with 115243).
...
llvm-svn: 115244
2010-09-30 23:57:50 +00:00
Marcin Swiderski
5e41573d26
Added methods for adding LocalScopes and CFGAutomaticObjDtors.
...
llvm-svn: 115237
2010-09-30 23:05:00 +00:00
Marcin Swiderski
321a707c9c
Added methods for inserting CFGAutomaticObjDtors to CFGBlocks,
...
Fixed some misspells in comments.
llvm-svn: 115236
2010-09-30 22:54:37 +00:00
Marcin Swiderski
e9862ce90a
Added:
...
- post-increament, distance and bool conversion methods to LocalScope::const_iterator,
- adding VarDecl to LocalScope.
Fixed some misspells in comments.
llvm-svn: 115227
2010-09-30 22:42:32 +00:00
Fariborz Jahanian
7bf13c49c7
Rewriting array element type of qualified-id.
...
Fixes rdra://8475819.
llvm-svn: 115201
2010-09-30 20:41:32 +00:00
Devang Patel
91bbb5547d
Introduce -flimit-debug-info.
...
In this experimental mode try avoiding debug info emission for classes as much as possible. The goal is to reduce size of produced debuginfo without reducing quality of debug info in general. This is a work in progress.
llvm-svn: 115188
2010-09-30 19:05:55 +00:00
Argyrios Kyrtzidis
58c65410ac
Support implicit includes when generating a PCH and allow the user to pass a -include on the command line following the PCH include.
...
Fixes rdar://7382084.
llvm-svn: 115159
2010-09-30 16:53:50 +00:00
Argyrios Kyrtzidis
2f23b414e9
Driver: Ignore the found PCH file if its '-include' is not the first one.
...
llvm-svn: 115158
2010-09-30 16:53:47 +00:00
Marcin Swiderski
99a9040a1f
Added two new command line arguments:
...
-cfg-add-implicit-dtors - sets CFG::BuildOptions::AddImplicitDtors for AnalysisCosumer to true,
-cfg-add-initializers - sets CFG::BuildOptions::AddInitializers for AnalysisCosumer to true.
llvm-svn: 115142
2010-09-30 07:41:24 +00:00
Ted Kremenek
b0e7d77729
Include changes to VisitCXXMemberCallExpr (call visitor functions).
...
llvm-svn: 115120
2010-09-30 01:06:29 +00:00
Sebastian Redl
99219f16b9
Make the FileID import map key on FileID.
...
llvm-svn: 115118
2010-09-30 01:03:06 +00:00
Sebastian Redl
517523014d
In MeasureTokenLength, the FileLoc supplied to the lexer must point to the start of the buffer, or we risk overflow.
...
llvm-svn: 115117
2010-09-30 01:03:03 +00:00
Ted Kremenek
3d6c0c0091
Tweak nil receiver checker to not warning about 64-bit return values.
...
Fixes: <rdar://problem/7513117>
llvm-svn: 115113
2010-09-30 00:37:10 +00:00
Tom Care
2f0419e1f8
AnalyzerStatsChecker improvements:
...
- Use BlockEntrance rather than BlockEdge to bring in line with UnreachableCodeChecker. Fixes an issue where unreached blocks would still be counted as reachable.
- Added warnings for all BlockAborted locations. This allows us to see where the analyzer stopped analyzing.
llvm-svn: 115110
2010-09-29 23:48:34 +00:00
Tom Care
472205be35
Change -analyzer-max-nodes to allow 0 as a parameter. This allows the analyzer to completely analyze a worklist regardless of time taken.
...
llvm-svn: 115108
2010-09-29 23:48:13 +00:00
Devang Patel
7c086227e6
Attach aritifical attribute with implicit parameters.
...
Radar 8493141.
llvm-svn: 115104
2010-09-29 23:09:21 +00:00
Devang Patel
330b65e350
Emit method access specifier.
...
Radar 8490416.
llvm-svn: 115090
2010-09-29 21:46:16 +00:00
Douglas Gregor
4ed49f375d
When performing template argument deduction of a function template
...
against a function type, be sure to check the type of the resulting
function template specialization against the desired function type
after substituting the deduced/defaulted template arguments. Fixes PR8196.
llvm-svn: 115086
2010-09-29 21:14:36 +00:00
Devang Patel
db2732ac42
Update to reflect DIFactory::CreateSubprogram() interface change from r115084.
...
llvm-svn: 115085
2010-09-29 21:05:52 +00:00
Devang Patel
984cdeef37
Remove dead code.
...
llvm-svn: 115079
2010-09-29 20:05:01 +00:00
Daniel Dunbar
181ca58074
Basic: Simplify getClangRepositoryPath and getClangRevision.
...
- I don't like returning StringRef's ever, unless it is actually important for
performance, which it isn't here.
- Also, stop validating getClangRevision to be an integer, I don't see a good
reason to do this.
llvm-svn: 115071
2010-09-29 19:15:29 +00:00
Daniel Dunbar
8caf6415a8
Add support for attribute((naked)), patch by Zoxc on cfe-commits!
...
- Minor style tweaks by me.
llvm-svn: 115056
2010-09-29 18:20:25 +00:00