summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix PR3938 by taking into account C99 6.10p4.Chris Lattner2009-04-181-1/+1
| | | | llvm-svn: 69413
* Substantially restructure function-like macro argument parsing.Chris Lattner2009-04-181-36/+56
| | | | | | | | | Highlights: PP::isNextPPTokenLParen() no longer eats the ( when present. We now simplify slightly the logic parsing macro arguments. We now handle PR3937 and other related cases correctly. llvm-svn: 69411
* Preliminary PCH support in the driverDouglas Gregor2009-04-183-17/+53
| | | | llvm-svn: 69410
* Lazy deserialization of function bodies for PCH files. For the CarbonDouglas Gregor2009-04-182-6/+16
| | | | | | | | | | "Hello, World!", this takes us from deserializing 6469 statements/expressions down to deserializing 1 statement/expression. It only translated into a 1% improvement on the Carbon-prefixed 403.gcc, but (a) it's the right thing to do, and (b) we expect this to matter more once we lazily deserialize identifiers. llvm-svn: 69407
* FunctionDecl::getBody() is getting an ASTContext argument for use inDouglas Gregor2009-04-1816-28/+50
| | | | | | | | lazy PCH deserialization. Propagate that argument wherever it needs to be. No functionality change, except that I've tightened up a few PCH tests in preparation. llvm-svn: 69406
* Fix two problems from PR3916, and one problem I noticed while hackingChris Lattner2009-04-172-7/+10
| | | | | | on the code. llvm-svn: 69404
* implement PR3940: #line numbers not fully checkedChris Lattner2009-04-171-0/+5
| | | | llvm-svn: 69403
* #line is allowed to have macros that expand to nothing after them.Chris Lattner2009-04-171-7/+13
| | | | llvm-svn: 69401
* Keep track of the number of statements/expressions written to and readDouglas Gregor2009-04-172-2/+19
| | | | | | | from a PCH file. It turns out that "Hello, World!" is bringing in 19% of all of the statements in Carbon.h, so we need to be lazy. llvm-svn: 69393
* fix a crash compiling code with its own definition of objc_assign_weak.Chris Lattner2009-04-171-5/+11
| | | | | | rdar://6800430 llvm-svn: 69392
* tweak redefinition of a typedef a bit to fix a couple of problems:Chris Lattner2009-04-171-15/+12
| | | | | | | | | | | | | | | | | | | | | | | 1. We had logic in sema to decide whether or not to emit the error based on manually checking whether in a system header file. 2. we were allowing redefinitions of typedefs in class scope in C++ if in header file. 3. there was no way to force typedef redefinitions to be accepted by the C compiler, which annoys me when stripping linemarkers out of .i files. The fix is to split the C++ class typedef redefinition path from the C path, and change the C path to be a warning that normally maps to error. This causes it to properly be ignored in system headers, etc. and gives us a way to control it. Passing -Wtypedef-redefinition now turns the error into a warning. One behavior change is that we now diagnose cases where you redefine a typedef in your .c file that was defined in a header file. This seems like reasonable behavior, and the diagnostic now indicates that it can be controlled with -Wtypedef-redefinition. llvm-svn: 69391
* Fix two embarrassing PCH bugs:Douglas Gregor2009-04-171-1/+1
| | | | | | | | | 1) Accidentally used delete [] on an array of statements that was allocated with ASTContext's allocator 2) Deserialization of names with multiple declarations (e.g., a struct and a function) used the wrong mangling constant, causing it to view declaration IDs as Decl*s. 403.gcc builds and links properly. llvm-svn: 69390
* Use PresumedLoc to record line number in debug info entries.Devang Patel2009-04-171-11/+22
| | | | llvm-svn: 69389
* Don't put msgrefs in used globals (in particular, we don't wantDaniel Dunbar2009-04-171-1/+0
| | | | | | no-dead-strip set on them). llvm-svn: 69388
* Appropriately set file name and directory name in debug info compile units.Devang Patel2009-04-172-27/+31
| | | | llvm-svn: 69387
* PCH support for inline assembly statements.Douglas Gregor2009-04-173-3/+95
| | | | | | | This completes support for all of C (+ extensions). We can (again) build a PCH file for Carbon.h. llvm-svn: 69385
* refactor htmldiags to be created up front like the other diag clients.Chris Lattner2009-04-171-15/+8
| | | | llvm-svn: 69379
* PCH tests for va_arg expressions. Verified that the blocks test does create ↵Douglas Gregor2009-04-171-2/+0
| | | | | | a BlockDeclRefExpr llvm-svn: 69376
* fix a crash on invalid by making ActOnDeclarator create decl withChris Lattner2009-04-171-0/+3
| | | | | | | a dummy *function* type when it is recovering and knows it needs a function. rdar://6802350 - clang crash on invalid input llvm-svn: 69374
* PCH support for blocksDouglas Gregor2009-04-172-1/+22
| | | | llvm-svn: 69373
* PCH support for GNU statement expressionsDouglas Gregor2009-04-172-0/+22
| | | | llvm-svn: 69370
* PCH support for indirect gotos and address-of-label expressions.Douglas Gregor2009-04-172-0/+70
| | | | llvm-svn: 69369
* PCH support for labels and goto.Douglas Gregor2009-04-172-1/+95
| | | | llvm-svn: 69364
* fix misspelt attribute.Chris Lattner2009-04-171-2/+2
| | | | llvm-svn: 69362
* Fix rdar://6800926 - crash compiling non-fragile _Bool bitfield ivar,Chris Lattner2009-04-171-5/+5
| | | | | | | the functional change here is changing ConvertType -> ConvertTypeForMem so that we handle i1 fields properly as memory. llvm-svn: 69361
* tidy some code.Chris Lattner2009-04-171-5/+2
| | | | llvm-svn: 69360
* PCH support for declaration statements, and a test for PredefinedExprDouglas Gregor2009-04-172-1/+35
| | | | llvm-svn: 69356
* PCH support for return statements.Douglas Gregor2009-04-172-0/+22
| | | | | | | Optimize PCH encoding for switch-case statements slightly, by making the switch-case numbering local to a particular statement. llvm-svn: 69355
* Implement lvalue test for conditional expressions.Sebastian Redl2009-04-173-4/+59
| | | | | | Add a few commented lines to the test case that point out things that don't work yet. llvm-svn: 69354
* Added -print-ivar-layout option. No change in functionalityFariborz Jahanian2009-04-171-0/+1
| | | | | | yet. llvm-svn: 69346
* Add support for the __has_trivial_destructor type trait.Anders Carlsson2009-04-175-6/+27
| | | | llvm-svn: 69345
* Add support for generating (very basic) C++ destructors. These aren't called ↵Anders Carlsson2009-04-175-40/+143
| | | | | | by anything yet. llvm-svn: 69343
* Attributes on block functions were not being set.Daniel Dunbar2009-04-174-8/+16
| | | | | | | - <rdar://problem/6800351> clang not producing correct large struct return code for Blocks llvm-svn: 69337
* PCH support for do-while and for loopsDouglas Gregor2009-04-172-0/+48
| | | | llvm-svn: 69334
* PCH support for while and continue statementsDouglas Gregor2009-04-172-0/+40
| | | | llvm-svn: 69332
* Fixup semantic analysis for nested blocks, and allow block literalMike Stump2009-04-172-2/+8
| | | | | | | expressions that can be of static duration to be returned. Radar 6786551 llvm-svn: 69331
* Implement basic code generation of constructor calls. We can now compile:Anders Carlsson2009-04-174-0/+71
| | | | | | | | | | | | struct S { S(int, int); }; void f() { S s(10, 10); } llvm-svn: 69330
* PCH support for the first batch of statements, including null,Douglas Gregor2009-04-173-3/+235
| | | | | | compound, case, default, if, switch, and break statements. llvm-svn: 69329
* Add GetAddrOfCXXConstructor and use it.Anders Carlsson2009-04-162-5/+16
| | | | llvm-svn: 69328
* If a class has a non-trivial constructor that doesn't take any arguments, we ↵Anders Carlsson2009-04-163-11/+26
| | | | | | | | | | | | | | | | | | will now make an implicit CXXTemporaryObjectExpr. So struct S { S(); }; void f() { S s; } 's' here will implicitly be declared as. S s = S(); llvm-svn: 69326
* Driver: Allow using clang as a precompiler, even if it is anDaniel Dunbar2009-04-161-0/+6
| | | | | | unsupported arch. llvm-svn: 69322
* Clean up the declaration-decoding step in the PCH reader, using theDouglas Gregor2009-04-161-59/+26
| | | | | | same ueber-easy visitor scheme used for expressions/statements. llvm-svn: 69320
* Prepare PCH reader and writer for (de-)serialization of statements. NoDouglas Gregor2009-04-162-186/+192
| | | | | | functionality change. llvm-svn: 69319
* Removed a no longer needed FIXME comment.Fariborz Jahanian2009-04-161-2/+0
| | | | llvm-svn: 69315
* Fix <rdar://problem/6765383> clang-6: clang does not appear to support ↵Steve Naroff2009-04-162-0/+12
| | | | | | declaring a static Block 'const'. llvm-svn: 69306
* Category method synbols must be qualified by gategory name toFariborz Jahanian2009-04-161-0/+6
| | | | | | match gcc's. llvm-svn: 69305
* Fix a crash bug when comparing overload quality of conversion operators with ↵Sebastian Redl2009-04-168-79/+420
| | | | | | | | | | | conversion constructors. Remove an atrocious amount of trailing whitespace in the overloaded operator mangler. Sorry, couldn't help myself. Change the DeclType parameter of Sema::CheckReferenceInit to be passed by value instead of reference. It wasn't changed anywhere. Let the parser handle C++'s irregular grammar around assignment-expression and conditional-expression. And finally, the reason for all this stuff: implement C++ semantics for the conditional operator. The implementation is complete except for determining lvalueness. llvm-svn: 69299
* Attempt to fix a read-after-free running test/Sema/designated-initializers.c.Eli Friedman2009-04-161-3/+3
| | | | | | Douglas, can you check that this is doing the right thing? llvm-svn: 69298
* When we create an implicit CXXTemporaryObjectExpr we don't need to check ↵Anders Carlsson2009-04-161-6/+1
| | | | | | that it's a valid init. Instead, just set it as the VarDecl's initializer. llvm-svn: 69292
* Ensure that the most recent declaration of a tentative definition winsDaniel Dunbar2009-04-161-3/+5
| | | | | | when generating a common definition. llvm-svn: 69287
OpenPOWER on IntegriCloud