aboutsummaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2010-10-02Use ParseObjCSelectorPiece for parsing getter and setter names in @property ↵Anders Carlsson
declarations. Fixes PR8169. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115411 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-02when expanding a builtin, if the argument is required to be a constant,Chris Lattner
force it to be a constant instead of emitting with EmitScalarExpr. In -ftrapv mode, they are not the same. This fixes rdar://8478728 + PR8221 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115388 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-01Don't add an imported function into its lexical context until *after*Douglas Gregor
we've set all of its parameters. Fixes <rdar://problem/8499598>; thanks to Sean for the diagnosis. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115387 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-01tidyChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115383 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-01kill off CheckX86BuiltinFunctionCallChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115382 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-01move imperative code to declarative definitions.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115381 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-01Mark explict methods as explict in debug info.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115379 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-01diagnose errors when a builtin that require constant arguments don't have them.Chris Lattner
For example, on: #include <emmintrin.h> int foo(int N) { __m128i white2; white2 = _mm_slli_si128(white2, N); return 0; } we used to get: fatal error: error in backend: Cannot yet select: intrinsic %llvm.x86.sse2.psll.dq now we get: /Users/sabre/t.c:4:11: error: argument to '__builtin_ia32_pslldqi128' must be a constant integer white2 = _mm_slli_si128(white2, N); ^~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /Users/sabre/t.c:1: /Volumes/Projects/cvs/llvm/Debug+Asserts/lib/clang/2.9/include/emmintrin.h:781:13: note: instantiated from: ((__m128i)__builtin_ia32_pslldqi128((__m128i)(VEC), (IMM)*8)) ^ ~~~~~~~ 1 error generated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115374 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-01enhance ASTContext::GetBuiltinType to return a bitmask indicating which ↵Chris Lattner
arguments are required to be ICE's. No clients of this new functionality yet! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115366 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-01random cleanups, no functionality change.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115361 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-01Factor out enumerator APSInt adjustment intoGabor Greif
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115355 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-01Better diagnostic for superfluous scope specifier inside a class definition ↵Francois Pichet
for member functions. + Fixit. Example: class A { void A::foo(); //warning: extra qualification on member 'foo' }; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115347 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-01UnreachableCodeChecker does not need to inherit from CheckerVisitor, only ↵Tom Care
Checker. It does not use any AST Stmt hooks, only VisitEndAnalysis. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115345 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-01Revert r115336 ("Thread PerFileData through everything."), becauseDouglas Gregor
we're missing the corresponding changes in the LLVM repository. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115340 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-01Thread PerFileData through everything. This allows us to remap stuff later.Sebastian Redl
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115336 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-01Record module loaders and module source order.Sebastian Redl
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115334 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-01Implement the C++0x "trailing return type" feature, e.g.,Douglas Gregor
auto f(int) -> int from Daniel Wallin! (With a few minor bug fixes from me). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115322 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-01Various builtins a require an integer constant. Not providingChris Lattner
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115302 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-01__builtin_ia32_psrldqi128 tooChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115301 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-01the second argument to __builtin_ia32_pslldqi128 must be an immediate,Chris Lattner
so it needs to be called from a macro, not a function. This is a necessary but insufficient step towards fixing PR8221 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115299 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-01Now the whether adding implicit dtors is controlled by cmd option.Zhongxing Xu
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115275 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-01The return value is never used.Zhongxing Xu
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115272 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-01Use default augument.Zhongxing Xu
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115271 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-01Simplify interface for addLocalScopeForStmt().Zhongxing Xu
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115270 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-01The old logic would add non-struct and non C++ struct variables to the localZhongxing Xu
scope. Now we only add C++ struct with non-trivial destructor variables to the local scope. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115269 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-01Added generating CFGAutomaticObjDtors for exception variable in catch statement.Marcin Swiderski
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115266 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-01Added generating CFGAutomaticObjDtors for init statement, condition variable ↵Marcin Swiderski
and implicit scope in for statement. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115265 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-01dded generating CFGAutomaticObjDtors for condition variable and implicit ↵Marcin Swiderski
scopes in switch statement. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115264 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-01If we get a TU_CONTEXT update from a chained PCH file before weDouglas Gregor
actually have an ASTContext, delay the processing of that update. Patch by Sebastian Redl! Fixes <rdar://problem/8499034>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115263 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-01Added generating CFGAutomaticObjDtors for condition variable and implicit ↵Marcin Swiderski
scopes in while and do statements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115262 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-01Enable chained precompiled headers for use with precompiled preamblesDouglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115260 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-01When an identifier that has a macro definition in the original PCHDouglas Gregor
file is somehow changed in a chained PCH file, make sure that we write out the macro definition. Fixes part of <rdar://problem/8499034>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115259 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-01Added generating CFGAutomaticObjDtors for condition variable and implicit ↵Marcin Swiderski
scopes in if statement. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115256 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-01Fixed checking for trivial destructor in ↵Marcin Swiderski
CFGBuilder::addLocalScopeForVarDecl. Checked type does not have to represent C++ class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115254 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-01Added:Marcin Swiderski
- Adding LocalScope for CompoundStmt, - Adding CFGAutomaticObjDtors for end of scope, return, goto, break, continue, - Regression tests for above cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115252 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-01Output debug info. for ivars declared in classFariborz Jahanian
extension and implementation. Fixes rdar://8493239. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115248 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-30Clang part of MMX rewrite (goes with 115243).Dale Johannesen
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115244 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-30Added methods for adding LocalScopes and CFGAutomaticObjDtors.Marcin Swiderski
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115237 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-30Added methods for inserting CFGAutomaticObjDtors to CFGBlocks,Marcin Swiderski
Fixed some misspells in comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115236 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-30Added:Marcin Swiderski
- post-increament, distance and bool conversion methods to LocalScope::const_iterator, - adding VarDecl to LocalScope. Fixed some misspells in comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115227 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-30Rewriting array element type of qualified-id.Fariborz Jahanian
Fixes rdra://8475819. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115201 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-30Introduce -flimit-debug-info.Devang Patel
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115188 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-30Support implicit includes when generating a PCH and allow the user to pass a ↵Argyrios Kyrtzidis
-include on the command line following the PCH include. Fixes rdar://7382084. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115159 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-30Driver: Ignore the found PCH file if its '-include' is not the first one.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115158 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-30Added two new command line arguments:Marcin Swiderski
-cfg-add-implicit-dtors - sets CFG::BuildOptions::AddImplicitDtors for AnalysisCosumer to true, -cfg-add-initializers - sets CFG::BuildOptions::AddInitializers for AnalysisCosumer to true. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115142 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-30Include changes to VisitCXXMemberCallExpr (call visitor functions).Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115120 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-30Make the FileID import map key on FileID.Sebastian Redl
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115118 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-30In MeasureTokenLength, the FileLoc supplied to the lexer must point to the ↵Sebastian Redl
start of the buffer, or we risk overflow. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115117 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-30Tweak nil receiver checker to not warning about 64-bit return values.Ted Kremenek
Fixes: <rdar://problem/7513117> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115113 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-29AnalyzerStatsChecker improvements:Tom Care
- 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115110 91177308-0d34-0410-b5e6-96231b3b80d8