summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Patch to move RequiresGCollection bit toFariborz Jahanian2010-09-163-29/+39
| | | | | | AggValueSlot slot. llvm-svn: 114045
* For self-comparison warning, check the source location of both the LHS and ↵Ted Kremenek2010-09-161-2/+4
| | | | | | | | | | | RHS to see if they are expanded from macros (and if so, omit the warning). Previously we were just looking at the location of the binary expression. Fixes <rdar://problem/8435950>. llvm-svn: 114044
* Handle bracket insertion for Objective-C class messages in a veryDouglas Gregor2010-09-152-43/+55
| | | | | | | | | | | narrow, almost useless case where we're inside a parenthesized expression, e.g., (NSArray alloc]) The solution to the general case still eludes me. llvm-svn: 114039
* Tweak comment as suggested by Sebastian.John McCall2010-09-151-1/+1
| | | | llvm-svn: 114019
* While handling change of file, check if _current_ file is already seen or ↵Devang Patel2010-09-151-1/+2
| | | | | | | | not. If current file is seen then it indicates that end of previous file's lexical scope. This fixes radar 8396182. llvm-svn: 114018
* Macro definitions in AST files have their own IDs.Sebastian Redl2010-09-152-5/+5
| | | | llvm-svn: 114014
* Initialize TypeOrExpr to NULL to silence a false-positive uninitialized warningNick Lewycky2010-09-151-1/+1
| | | | | | from certain GCC's. Patch by Neil Vachharajani! llvm-svn: 113995
* Improve code completion for Objective-C message sends when the openingDouglas Gregor2010-09-152-19/+23
| | | | | | | | | | | | | | | | | | | | | | | '[' is missing. Prior commits improving recovery also improved code completion beyond the first selector, e.g., at or after the "to" in calculator add:x to:y but not after "calculator". We now provide the same completions for calculator <CC> that we would for [calculator <CC> if "calculator" is an expression whose type is something that can receive Objective-C messages. This code completion works for instance and super message sends, but not class message sends. llvm-svn: 113976
* Make the new -fobjc-nonfragile-abi2 the defaultFariborz Jahanian2010-09-151-10/+12
| | | | | | | abi for clang's objective-c compilations. (radar 8353555). llvm-svn: 113974
* Extend bracket insertion to message sends to "super", e.g.,Douglas Gregor2010-09-151-0/+12
| | | | | | | | super method:arg] will now recover nicely and insert the '[' before 'super'. llvm-svn: 113971
* Extend bracket insertion to handle nullary selectors, e.g.Douglas Gregor2010-09-151-1/+1
| | | | | | a getFoo] llvm-svn: 113969
* Implement bracket insertion for Objective-C instance message sends asDouglas Gregor2010-09-157-27/+93
| | | | | | | | | | | | | | | | | | | | | | | part of parser recovery. For example, given: a method1:arg]; we detect after parsing the expression "a" that we have the start of a message send expression. We pretend we've seen a '[' prior to the a, then parse the remainder as a message send. We'll then give a diagnostic+fix-it such as: fixit-objc-message.m:17:3: error: missing '[' at start of message send expression a method1:arg]; ^ [ The algorithm here is very simple, and always assumes that the open bracket goes at the beginning of the message send. It also only works for non-super instance message sends at this time. llvm-svn: 113968
* one piece of code is responsible for the lifetime of every aggregateJohn McCall2010-09-1517-212/+237
| | | | | | | | | | | | | slot. The easiest way to do that was to bundle up the information we care about for aggregate slots into a new structure which demands that its creators at least consider the question. I could probably be convinced that the ObjC 'needs GC' bit should be rolled into this structure. Implement generalized copy elision. The main obstacle here is that IR-generation must be much more careful about making sure that exactly llvm-svn: 113962
* Relax assertion in CFG builder when processing ForStmts. This fixes an ↵Ted Kremenek2010-09-151-1/+2
| | | | | | | | assertion failure on code containing GNU statement expressions reported in PR 8141. llvm-svn: 113953
* Disallow the use of UnknownVal as the index for ElementRegions. UnknownVals ↵Ted Kremenek2010-09-154-13/+17
| | | | | | | | | | | | | | | | | can be used as the index when the value evaluation isn't powerful enough. By creating ElementRegions with UnknownVals as the index, this gives the false impression that they are the same element, when they really aren't. This becomes really problematic when deriving symbols from these regions (e.g., those representing the initial value of the index), since two different indices will get the same symbol for their binding. This fixes an issue with the idempotent operations checker that would cause two indices that are clearly not the same to make it appear as if they always had the same value. Fixes <rdar://problem/8431728>. llvm-svn: 113920
* Fix classification of statement expressions.Douglas Gregor2010-09-151-1/+1
| | | | llvm-svn: 113917
* Fix Windows64 target info so pointer arithmetic is done correctly, and no ↵Cameron Esfahani2010-09-151-0/+3
| | | | | | sign extension code is emitted: PtrDiffType needs to be a signed long long. Add a corresponding test case. llvm-svn: 113910
* Microsoft's flexible array rules relaxation:Francois Pichet2010-09-151-4/+15
| | | | | | | - in union - as the only element of a struct/class. llvm-svn: 113909
* Introduce a new code-completion context for a parenthesizedDouglas Gregor2010-09-143-11/+33
| | | | | | | | expression, e.g., after the '(' that could also be a type cast. Here, we provide types as code-completion results in C/Objective-C (C++ already had them), although we wouldn't in a normal expression context. llvm-svn: 113904
* Add CFG::BuildOptions class to pass in CFG builder options under on ↵Ted Kremenek2010-09-142-21/+17
| | | | | | parameter. Patch by Marcin Świderski! llvm-svn: 113898
* Fix destructor and assignment operator lookup in the has_nothrow traits.Sebastian Redl2010-09-141-14/+18
| | | | llvm-svn: 113897
* Adjust assertion in RegionStoreManager::RetrieveArray() to also take into ↵Ted Kremenek2010-09-141-1/+1
| | | | | | account typedefs. llvm-svn: 113893
* Driver: Add a -stdlib= argument which can be used to select the C++ standardDaniel Dunbar2010-09-141-0/+19
| | | | | | | | | | | library to use. - This is currently useful for testing libc++; you can now use 'clang++ -stdlib=libc++ t.cpp' to compile using it if installed. - In the future could also be used to select other standard library choices if alternatives become available (for example, to use an alternate C library). llvm-svn: 113891
* Driver: Factor out some code for handling the C++ standard library.Daniel Dunbar2010-09-142-7/+35
| | | | llvm-svn: 113890
* Simplify.Daniel Dunbar2010-09-141-10/+9
| | | | llvm-svn: 113889
* Don't divide-by-zero in RegionStoreManager::getSizeInElements() when getting ↵Ted Kremenek2010-09-141-0/+8
| | | | | | | | the size of a VLA. We don't track VLA extents yet, but we should at least not crash. Fixes <rdar://problem/8424269>. llvm-svn: 113888
* RHS of property expression assignment requiresFariborz Jahanian2010-09-142-14/+34
| | | | | | | copy initialization before passing it to a setter. Fixes radar 8427922. llvm-svn: 113885
* When marking the declarations in a default argument expression asDouglas Gregor2010-09-143-2/+37
| | | | | | | | | "used", at the time that the default argument itself is used, also mark destructors that will be called by this expression. This fixes a regression that I introduced in r113700, which broke WebKit, and fixes <rdar://problem/8427926>. llvm-svn: 113883
* Eliminate the default case in the expression-classification code, soDouglas Gregor2010-09-141-7/+65
| | | | | | | | that we're sure to keep it updated when new expression kinds emerge. Also fixes a few little bugs in the classification of expressions. llvm-svn: 113864
* Tweak this assert.John McCall2010-09-141-1/+1
| | | | llvm-svn: 113863
* Rename 'MaxLoop' to 'MaxVisit' in AnalysisManager to more correctly reflect ↵Tom Care2010-09-142-2/+2
| | | | | | that we aborted analysis may not necessarily be due to a loop. llvm-svn: 113862
* The paired 'operator delete' for a placement 'operator new' is always aJohn McCall2010-09-141-1/+8
| | | | | | | placement 'operator delete', even if there are no placement args (i.e. overload resolution selected an operator new with default arguments). llvm-svn: 113861
* Implement the EH cleanup to call 'operator delete' if a new-expression throwsJohn McCall2010-09-144-110/+384
| | | | | | (but not if destructors associated with the full-expression throw). llvm-svn: 113836
* Fix CFGBuilder crash reported in PR 8141.Ted Kremenek2010-09-141-2/+6
| | | | llvm-svn: 113826
* Fix VLA miscompilation.Argyrios Kyrtzidis2010-09-141-0/+1
| | | | | | | llvm.stacksave/llvm.stackrestore wasn't emitted for VLAs in inner scopes. Fixes r8403108. llvm-svn: 113822
* Revert "CMake: Update to use standard CMake dependency tracking facilities ↵Michael J. Spencer2010-09-1314-177/+81
| | | | | | | | | | | | | instead" This reverts commit r113631 Conflicts: CMakeLists.txt lib/CodeGen/CMakeLists.txt llvm-svn: 113817
* Remove from the CFG the half-implemented support for scoping information. ↵Ted Kremenek2010-09-131-42/+4
| | | | | | | | We decided that scope information doesn't belong in the CFG at all, since it is a lexical construct. Patch by Marcin Świderski! llvm-svn: 113798
* Don't crash when using type traits on a class with a constructor template.Sebastian Redl2010-09-131-0/+8
| | | | llvm-svn: 113796
* Remove CXXRecordDecl::getDefaultConstructor(), an inherently unsafe function ↵Sebastian Redl2010-09-133-36/+40
| | | | | | due to lazy declaration of default constructors. Now that __has_nothrow_constructor doesn't use it anymore, part of PR8101 is fixed. llvm-svn: 113794
* Have __has_nothrow_copy use Sema's lookup routines. This fixes the problem ↵Sebastian Redl2010-09-131-1/+1
| | | | | | with not finding implicitly declared copy constructors, part of PR8107. llvm-svn: 113784
* Eagerly evaluate type traits in Sema instead of lazily in AST. They actually ↵Sebastian Redl2010-09-136-209/+213
| | | | | | need Sema access to be correct, fixes coming up. llvm-svn: 113782
* When applying 'delete' on a pointer-to-array type match GCC and EDG behavior ↵Argyrios Kyrtzidis2010-09-133-2/+13
| | | | | | | | and treat it as 'delete[]'. Also offer a fix-it hint adding '[]'. llvm-svn: 113778
* Remove the trivial setters from CXXDeleteExpr.Argyrios Kyrtzidis2010-09-131-6/+5
| | | | llvm-svn: 113777
* Fix a typo noted by GaborDouglas Gregor2010-09-131-1/+1
| | | | llvm-svn: 113754
* Block description for trivial block literals haveFariborz Jahanian2010-09-131-2/+1
| | | | | | their 'isa' field scanned regardless. llvm-svn: 113749
* Fix C++ PCH issue.Argyrios Kyrtzidis2010-09-132-3/+13
| | | | | | | | The canonical FunctionTemplateDecl contains the specializations but we cannot use getCanonicalDecl on Template because it may still be initializing. Write and read it from PCH. Fixes http://llvm.org/PR8134 llvm-svn: 113744
* Avoid setters in ASTDeclReader::VisitClassTemplatePartialSpecializationDecl.Argyrios Kyrtzidis2010-09-132-24/+13
| | | | llvm-svn: 113743
* Avoid setters in ASTDeclReader::VisitClassTemplateSpecializationDecl.Argyrios Kyrtzidis2010-09-131-12/+21
| | | | llvm-svn: 113742
* Avoid setters in ASTDeclReader::VisitCXXRecordDecl.Argyrios Kyrtzidis2010-09-131-4/+5
| | | | llvm-svn: 113741
* Congruent diagnostic for void* arithmetic.Abramo Bagnara2010-09-131-1/+5
| | | | llvm-svn: 113740
OpenPOWER on IntegriCloud