summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* Call inliner improvements:Zhongxing Xu2010-02-258-51/+241
| | | | | | | | | | | | | | This patch implements the CallEnter/CallExit idea of Ted. Add two interfaces to GRSubEngine: ProcessCallEnter, ProcessCallExit. The CallEnter program point uses caller's location context. The CallExit program point uses callee's location context. CallEnter is built by GRStmtNodeBuilder. CallExit is built by GREndPathNodeBuilder. llvm-svn: 97122
* Add MacOSXAPIChecker, a meta checker to include various precondition checks ↵Ted Kremenek2010-02-254-0/+144
| | | | | | | | | | | | for calls to various MacOS X functions. The checks in BasicObjCFoundationChecks.cpp will gradually be migrated here. As a first check, check that when 'dispatch_once()' is passed a predicate value that has non-local storage. llvm-svn: 97116
* When generating error node, check to see if we already cached out.Ted Kremenek2010-02-251-0/+3
| | | | llvm-svn: 97115
* Targets (like pic16) may have mangled the name of global variables, Sanjiv Gupta2010-02-251-1/+1
| | | | | | so get the name from Var rather than the original decl. llvm-svn: 97114
* Update CMake makefilesDouglas Gregor2010-02-251-1/+1
| | | | llvm-svn: 97113
* Restore the invariant that a nested-name-specifier can only containDouglas Gregor2010-02-259-93/+33
| | | | | | | | | class types, dependent types, and namespaces. I had previously weakened this invariant while working on parsing pseudo-destructor expressions, but recent work in that area has made these changes unnecessary. llvm-svn: 97112
* Frontend: Add CodeGenAction::takeModule().Daniel Dunbar2010-02-252-8/+39
| | | | llvm-svn: 97111
* Frontend: Pull CodeGenAction out more, and eliminate CreateBackendConsumer.Daniel Dunbar2010-02-256-115/+105
| | | | | | | | | | This is the way I would like to move the frontend function towards -- distinct pieces of functionality should be exposed only via FrontendAction implementations which have clean and relatively-stable APIs. This also isolates the surface area in clang which depends on LLVM CodeGen. llvm-svn: 97110
* Remove dead code.Anders Carlsson2010-02-251-176/+0
| | | | llvm-svn: 97109
* Move the vcall and vbase offset layout code out into its own class.Anders Carlsson2010-02-251-8/+224
| | | | llvm-svn: 97107
* Driver: Allow driver title (for --help) to be overridden by clients.Daniel Dunbar2010-02-252-2/+9
| | | | llvm-svn: 97106
* Enhance the unused ivar checker to not consider an ivar to be accidentally ↵Ted Kremenek2010-02-253-16/+30
| | | | | | | | unused when it is explicitly marked as unused via __attribute__((unused)). llvm-svn: 97104
* Allow __attribute__((unused)) to be applied to ObjC ivars.Ted Kremenek2010-02-252-11/+12
| | | | llvm-svn: 97103
* Driver: Use TextDiagnosticPrinter instead of a custom one.Daniel Dunbar2010-02-251-33/+4
| | | | llvm-svn: 97102
* Add TextDiagnosticPrinter::setPrefix, for adding a string to prefix diagnosticDaniel Dunbar2010-02-252-1/+12
| | | | | | messages with. llvm-svn: 97101
* Remove some oogly code made dead by the pseudo-destructorDouglas Gregor2010-02-251-44/+0
| | | | | | instantiation changes. llvm-svn: 97095
* Use CXXPseudoDestructorExpr as the stored representation for dependentDouglas Gregor2010-02-258-218/+197
| | | | | | | | | | | | | | | | expressions that look like pseudo-destructors, e.g., p->T::~T() where p has dependent type. At template instantiate time, we determine whether we actually have a pseudo-destructor or a member access, and funnel down to the appropriate routine in Sema. Fixes PR6380. llvm-svn: 97092
* Catch more uses of uninitialized implicit conversion sequences.John McCall2010-02-255-50/+102
| | | | | | | When diagnosing bad conversions, skip the conversion for ignored object arguments. Fixes PR 6398. llvm-svn: 97090
* Remove test case dependancy on platform headers.Ted Kremenek2010-02-251-1/+5
| | | | llvm-svn: 97088
* Add UnixAPIChecker, a meta checker to include various precondition checks ↵Ted Kremenek2010-02-255-0/+169
| | | | | | | | | | | for calls to various unix/posix functions, e.g. 'open()'. As a first check, check that when 'open()' is passed 'O_CREAT' that it has a third argument. llvm-svn: 97086
* Remove stray #include.Ted Kremenek2010-02-251-1/+0
| | | | llvm-svn: 97085
* Remove #include.Ted Kremenek2010-02-251-1/+0
| | | | llvm-svn: 97084
* Divide list of registration functions in API and foundational checks. Also ↵Ted Kremenek2010-02-251-2/+6
| | | | | | trim whitespace. llvm-svn: 97083
* Sort list of checker registration functions.Ted Kremenek2010-02-251-12/+12
| | | | llvm-svn: 97082
* Keep track of the location of the '~' in a pseudo-destructor expression.Douglas Gregor2010-02-245-4/+18
| | | | llvm-svn: 97080
* Retain complete source information for the type after the '~' in aDouglas Gregor2010-02-245-59/+98
| | | | | | | | | | | CXXPseudoDestructorExpr. Update template instantiation for pseudo-destructor expressions to use this source information and to make use of Sema::BuildPseudoDestructorExpr when the base expression is dependent or refers to a scalar type. llvm-svn: 97079
* Make sure that we finish the DeclSpec when parsing a C++Douglas Gregor2010-02-241-0/+1
| | | | | | | | type-specifier-seq. Fixes some conditional-jump-on-unitialized-value errors in valgrind. Also counts as attempt #2 at making the MSVC buildbot happy. llvm-svn: 97077
* Make sure that we have type source information for the scope type of aDouglas Gregor2010-02-241-1/+6
| | | | | | pseudo-destructor expression. Attempt #1 at fixing the MSVC buildbot. llvm-svn: 97076
* Added test case for non-objective-c situation inFariborz Jahanian2010-02-241-0/+12
| | | | | | my last patch. llvm-svn: 97075
* Implement nasty rewriting of nested blocks when innerFariborz Jahanian2010-02-242-4/+102
| | | | | | | blocks use variables not used in any of the outer blocks. (Fixes radar 7682149). llvm-svn: 97073
* Split ActOnPseudoDestructorExpr into the part that interprets theDouglas Gregor2010-02-242-86/+158
| | | | | | | | parser's data structures and the part that performs semantic analysis and AST building, in preparation for improved template instantiation of pseudo-destructor expressions. llvm-svn: 97070
* Get rid of 'this' adjustments from the FinalOverriders class since they can ↵Anders Carlsson2010-02-241-34/+0
| | | | | | be different for the same overrider in different parts of the vtable. llvm-svn: 97068
* Improve this adjustment pointer calculation.Anders Carlsson2010-02-241-5/+16
| | | | llvm-svn: 97067
* Make ComputeThisAdjustmentBaseOffset public for now.Anders Carlsson2010-02-241-7/+8
| | | | llvm-svn: 97066
* Add test case for PR6141, which was fixed a few days agoDouglas Gregor2010-02-241-0/+27
| | | | llvm-svn: 97063
* Add test for AST importing of C++ namespaces, missing from a prior commitDouglas Gregor2010-02-243-0/+40
| | | | llvm-svn: 97062
* Add PCH test for C++ namespaces, missing from a previous commitDouglas Gregor2010-02-242-0/+27
| | | | llvm-svn: 97061
* Retain source information for the "type-name ::" in aDouglas Gregor2010-02-243-11/+50
| | | | | | | | pseudo-destructor expression such as p->T::~T() llvm-svn: 97060
* ActOnPseudoDestructorExpr now performs all semantic analysis forDouglas Gregor2010-02-248-64/+312
| | | | | | | | | | | | | | | | pseudo-destructor expressions, and builds the CXXPseudoDestructorExpr node directly. Currently, this only affects pseudo-destructor expressions when they are parsed, but not after template instantiation. That's coming next... Improve parsing of pseudo-destructor-names. When parsing the nested-name-specifier and we hit the sequence of tokens X :: ~, query the actual module to determine whether X is a type-name (in which case the X :: is part of the pseudo-destructor-name but not the nested-name-specifier) or not (in which case the X :: is part of the nested-name-specifier). llvm-svn: 97058
* Fix an iterator-invalidation bug that was causing selfhost errorsJohn McCall2010-02-241-10/+6
| | | | | | | on non-darwin platforms. Fixes PR6411. Test case doesn't reduce, unfortunately. llvm-svn: 97055
* Rework parsing of pseudo-destructor expressions and explicitDouglas Gregor2010-02-247-27/+373
| | | | | | | | | | | | | | | | | | | | | | | | | | | | destructor calls, e.g., p->T::~T We now detect when the member access that we've parsed, e.g., p-> or x. may be a pseudo-destructor expression, either because the type of p or x is a scalar or because it is dependent (and, therefore, may become a scalar at template instantiation time). We then parse the pseudo-destructor grammar specifically: ::[opt] nested-name-specifier[opt] type-name :: ∼ type-name and hand those results to a new action, ActOnPseudoDestructorExpr, which will cope with both dependent member accesses of destructors and with pseudo-destructor expressions. This commit affects the parsing of pseudo-destructors, only; the semantic actions still go through the semantic actions for member access expressions. That will change soon. llvm-svn: 97045
* Generate correct vcall offsets when we have a primary virtual base that is ↵Anders Carlsson2010-02-242-7/+61
| | | | | | not a primary base in the complete class hierarchy. llvm-svn: 97039
* References to const int parameters with ICE default arguments are not ICEs.John McCall2010-02-242-2/+14
| | | | | | Fixes PR6373. llvm-svn: 97037
* Make this test portable to ABIs that use sret.John McCall2010-02-241-1/+1
| | | | llvm-svn: 97035
* Fix test case and convert fully to FileCheck.John McCall2010-02-241-6/+6
| | | | llvm-svn: 97032
* Canonicalize parameter and return types before computing ABI info. EliminatesJohn McCall2010-02-246-72/+91
| | | | | | | | | | | a common source of oddities and, in theory, removes some redundant ABI computations. Also fixes a miscompile I introduced yesterday by refactoring some code and causing a slightly different code path to be taken that didn't perform *parameter* type canonicalization, just normal type canonicalization; this in turn caused a bit of ABI code to misfire because it was looking for 'double' or 'float' but received 'const float'. llvm-svn: 97030
* Add comments.Zhongxing Xu2010-02-241-0/+2
| | | | llvm-svn: 97020
* Disable one test case because of the inconsistent results it is giving onTed Kremenek2010-02-241-1/+3
| | | | | | Windows and Mac OS X. Will investigate later. llvm-svn: 97016
* When we encounter a function-specific attribute in a declaration specifier,Charles Davis2010-02-242-5/+13
| | | | | | | apply it only to the function itself, and never to the return type. Fixes part of PR6408. llvm-svn: 97015
* Always add CallExpr as block-level expression. Inline-based interproceduralZhongxing Xu2010-02-243-5/+5
| | | | | | analysis needs this. llvm-svn: 97014
OpenPOWER on IntegriCloud