summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Prevent rewriter crash when variable type is missing.Fariborz Jahanian2010-02-262-0/+7
| | | | | | Fixes radar 7692183. llvm-svn: 97281
* Minor cleanup of the rewriter.Fariborz Jahanian2010-02-261-18/+22
| | | | llvm-svn: 97280
* Removed some unused code in rewriter.Fariborz Jahanian2010-02-261-28/+2
| | | | llvm-svn: 97274
* Sundry fixes to the new vtable builder.John McCall2010-02-261-13/+33
| | | | llvm-svn: 97258
* Fix rewriting of byref variables in nested blocks.Fariborz Jahanian2010-02-262-2/+32
| | | | | | Fixes radar 7692350. llvm-svn: 97254
* fix rdar://7683173, rejecting an invalid conditionalChris Lattner2010-02-262-1/+8
| | | | llvm-svn: 97253
* For printf format string checking, move the tracking of the data argument ↵Ted Kremenek2010-02-265-54/+102
| | | | | | | | | index out of Sema and into analyze_printf::ParseFormatString(). Also use a bitvector to determine what arguments have been covered (instead of just checking to see if the last argument consumed is the max argument). This is prep. for support positional arguments (an IEEE extension). llvm-svn: 97248
* Rewriting of imported variable from outerFariborz Jahanian2010-02-262-0/+19
| | | | | | | blocks's argument in the inner block requires special treatment. Fixes radar 7692419. llvm-svn: 97244
* Use a GDM to record the returned expression in the state when VisitReturnStmt.Zhongxing Xu2010-02-261-10/+28
| | | | | | | | | | | Use this information to find the returned value and bind it to CallExpr in ProcessCallExit. And there is no need to remove dead bindings in ProcessCallExit, because a. it would clean up the return value bound to CallExpr b. we still would do it in the next ProcessStmt(), where we would not misclean up the return value. llvm-svn: 97225
* Make the destructor public. ddunbar, lemme know if you'd prefer a differentChandler Carruth2010-02-261-1/+2
| | | | | | fix, just trying to get the build bots happy again. llvm-svn: 97223
* Make GDM private.Zhongxing Xu2010-02-261-4/+1
| | | | llvm-svn: 97222
* Fix an assertion-on-error during tentative constructor parsing byJohn McCall2010-02-2615-88/+124
| | | | | | | | | | propagating error conditions out of the various annotate-me-a-snowflake routines. Generally (but not universally) removes redundant diagnostics as well as, you know, not crashing on bad code. On the other hand, I have just signed myself up to fix fiddly parser errors for the next week. Again. llvm-svn: 97221
* An explicit specialization is allowed following an explicitDouglas Gregor2010-02-262-7/+48
| | | | | | | instantiation so long as that explicit specialization was declared previously. Fixes PR6160. llvm-svn: 97210
* Implement semantic analysis for C++ [expr.new]p18-20, which describeDouglas Gregor2010-02-266-3/+343
| | | | | | | | | | how we find the operator delete that matches withe operator new we found in a C++ new-expression. This will also need CodeGen support. On a happy note, we're now a "nans" away from building tramp3d-v4. llvm-svn: 97209
* Remove derelict GRStmtNodeBuilder::LastNode.Zhongxing Xu2010-02-263-10/+3
| | | | llvm-svn: 97207
* Support rewriting of property synthesis with retain/copyFariborz Jahanian2010-02-262-25/+120
| | | | | | attributes. Fixes radar 7214439. llvm-svn: 97203
* Commit Eli's fix for implicit conversions to array type. Fixes PR6264.Douglas Gregor2010-02-262-1/+13
| | | | llvm-svn: 97202
* Don't generate method metadata for @dynamic properties. Fixes PR6354.David Chisnall2010-02-261-7/+12
| | | | llvm-svn: 97199
* Use the power of types to track down another canonicalization bug inJohn McCall2010-02-268-64/+111
| | | | | | the ABI-computation interface. Fixes <rdar://problem/7691046>. llvm-svn: 97197
* Make sure to mark constructors, operator new, and operator delete asDouglas Gregor2010-02-262-2/+73
| | | | | | | | | used when we instantiate C++ new expressions, delete expressions, and object-construction expressions. Fixes PR6424, although we can't test all of it until we finish implementing lookup of "operator delete" for new expressions (!). llvm-svn: 97195
* Update checker build.Ted Kremenek2010-02-261-1/+1
| | | | llvm-svn: 97186
* When we decide to re-use an existing CXXConstructExpr node, make sureDouglas Gregor2010-02-262-1/+19
| | | | | | | | to mark the constructor as referenced. Fixes the narrow issue reported in PR6424, but there are a few other places that I'll fix before closing out that PR. llvm-svn: 97185
* When computing the composite pointer type for relational comparisons,Douglas Gregor2010-02-255-7/+81
| | | | | | | | | | | | | | | | | | | | | | | | equality comparisons, and conditional operators, produce a composite pointer type with the appropriate additional "const" qualifiers if the pointer types would otherwise be incompatible. This is a small extension (also present in GCC and EDG in a slightly different form) that permits code like: void** i; void const** j; i == j; with the following extwarn: t.cpp:5:5: warning: comparison of distinct pointer types ('void **' and 'void const **') uses non-standard composite pointer type 'void const *const *' [-pedantic] i == j; ~ ^ ~ Fixes PR6346, and I'll be filing a core issue about this with the C++ committee. llvm-svn: 97177
* Improve vcall offset handling.Anders Carlsson2010-02-251-12/+26
| | | | llvm-svn: 97174
* Fux a bug where we were trying to add overriders for non-virtual bases of ↵Anders Carlsson2010-02-252-3/+32
| | | | | | virtual bases more than once. llvm-svn: 97173
* Move ~CodeGenAction out-of-line.Daniel Dunbar2010-02-252-0/+3
| | | | llvm-svn: 97166
* Restore Zhongxing's commits r97122 r97127 r97129 r97131 which were reverted ↵Douglas Gregor2010-02-258-75/+266
| | | | | | due to a Clang-on-Clang failure llvm-svn: 97162
* Allow us to compare derived-to-base conversions between a referenceDouglas Gregor2010-02-252-27/+21
| | | | | | | binding and a copy-construction. Fixes an overloading problem in the Clang-on-Clang build. llvm-svn: 97161
* Forgot to include nested protocols in collection, resulting inFariborz Jahanian2010-02-252-1/+33
| | | | | | bogus warning. Fixes radar 7682116. llvm-svn: 97157
* Don't try to finalize an ill-formed variable or one whose class type is ↵Douglas Gregor2010-02-252-1/+19
| | | | | | ill-formed. Fixes PR6421 llvm-svn: 97152
* Revert patches r97122 r97127 r97129 r97131.Jakob Stoklund Olesen2010-02-258-266/+75
| | | | | | They were breaking clang-x86_64-darwin10-selfhost llvm-svn: 97138
* Add "template" keyword at strategic position to fixGabor Greif2010-02-251-1/+2
| | | | | | | | | | | | | | | | | compilation using g++ v3.4. I'll watch the buildbots and back out if necessary. Feel free to do the same if something breaks. Without this patch I get (on g++ 3.4.6) following error: In file included from clang/lib/Sema/SemaTemplate.cpp:14: clang/lib/Sema/TreeTransform.h: In member function `clang::ASTOwningResult<&clang::ActionBase::DeleteExpr> clang::TreeTransform<Derived>::RebuildCXXPseudoDestructorExpr(clang::ASTOwningResult<&clang::ActionBase::DeleteExpr>, clang::SourceLocation, bool, clang::NestedNameSpecifier*, clang::SourceRange, clang::TypeSourceInfo*, clang::SourceLocation, clang::SourceLocation, clang::PseudoDestructorTypeStorage)': clang/lib/Sema/TreeTransform.h:5784: error: expected primary-expression before '>' token clang/lib/Sema/TreeTransform.h:5784: error: expected primary-expression before ')' token make[4]: *** [clang/lib/Sema/Release/SemaTemplate.o] Error 1 llvm-svn: 97136
* When comparing two method overload candidates during overload diagnostics,John McCall2010-02-252-2/+4
| | | | | | | | | | | skip the object argument conversion if either of the candidates didn't initialize it. Fixes PR6421, which is such a very straightforward extension of PR6398 that I should have worked it into the last test case (and therefore caught it then). Ah well. llvm-svn: 97135
* Fix a really trivial crasher and begin fleshing out one of the namespace testChandler Carruth2010-02-252-5/+49
| | | | | | cases. llvm-svn: 97134
* Add a minimal C interpreter example.Daniel Dunbar2010-02-254-1/+198
| | | | | | | | | | | | | | | | | | - Demonstrates how to build a standalone tool which loads source code using the Driver and Frontend libraries, and then uses CodeGen and the JIT to actually execute the code. - Still more complicated than it should be, but hey its only 153 lines. :) -- ddunbar@ozzy:tmp$ cat hello.c #include <stdio.h> int main() { printf("hello world\n"); return 0; } ddunbar@ozzy:tmp$ clang-interpreter hello.c hello world -- llvm-svn: 97133
* Move the GenerateCallExitNode logic completely into GREndPathNodeBuilder.Zhongxing Xu2010-02-252-16/+7
| | | | llvm-svn: 97131
* Move the dead bindings removal logic from CallInliner to ↵Zhongxing Xu2010-02-254-16/+24
| | | | | | GRExprEngine::ProcessCallExit(). llvm-svn: 97129
* Add a new conversion rank to classify conversions between complex and scalarChandler Carruth2010-02-254-26/+27
| | | | | | | | types. Rank these conversions below other conversions. This allows overload resolution when the only distinction is between a complex and scalar type. It also brings the complex overload resolutin in line with GCC's. llvm-svn: 97128
* Add comments.Zhongxing Xu2010-02-251-1/+3
| | | | llvm-svn: 97127
* 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
OpenPOWER on IntegriCloud