summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* PR4097: add logic to Evaluate to handle pointer equality comparisons.Eli Friedman2009-04-282-7/+18
| | | | llvm-svn: 70317
* Allow some differences between the predefines buffer used to build aDouglas Gregor2009-04-286-51/+230
| | | | | | | | | | | | | PCH file and the predefines buffer used when including the PCH file. We (explicitly) detect conflicting macro definitions (rejecting the PCH file) and about missing macro definitions (they'll be automatically pulled from the PCH file anyway). We're missing some checking to make sure that new macro definitions won't have any impact on the PCH file itself (e.g., #define'ing an identifier that the PCH file used). llvm-svn: 70316
* implement -WmulticharChris Lattner2009-04-284-2/+21
| | | | llvm-svn: 70315
* Add some text to the user manual describing the current state of C Eli Friedman2009-04-281-6/+126
| | | | | | support in clang. llvm-svn: 70314
* Revert 70293.Ted Kremenek2009-04-281-0/+7
| | | | llvm-svn: 70313
* merge number.c into constants.c and start running it in -verify mode.Chris Lattner2009-04-282-13/+11
| | | | llvm-svn: 70310
* Fix a minor edge case in C89 mode related to the definition of a Eli Friedman2009-04-283-2/+4
| | | | | | | | | | "function designator". (This causes a minor glitch in the diagnostics for C++ member pointers, but we weren't printing the right diagnostic there anyway.) llvm-svn: 70307
* Fix additional issues pointed out in PR4088.Eli Friedman2009-04-281-2/+2
| | | | llvm-svn: 70305
* ccc-analyzer: Don't automatically generate 'Parser Rejects' files anymore. TheTed Kremenek2009-04-281-1/+4
| | | | | | | | frontend is far enough along that most discrepancies between Clang and GCC are (at least for C and Objective-C) are intentional. We also now have codegen to test the frontend. llvm-svn: 70303
* Update analyzer build.Ted Kremenek2009-04-281-1/+1
| | | | llvm-svn: 70295
* Add test case.Zhongxing Xu2009-04-281-0/+18
| | | | llvm-svn: 70294
* Now we can remove the 'blast-through' code.Zhongxing Xu2009-04-281-7/+0
| | | | llvm-svn: 70293
* Improve compatibility with GCC regarding inline semantics in GNU89Douglas Gregor2009-04-288-285/+179
| | | | | | | | | | | mode and in the presence of __gnu_inline__ attributes. This should fix both PR3989 and PR4069. As part of this, we now keep track of all of the attributes attached to each declaration even after we've performed declaration merging. This fixes PR3264. llvm-svn: 70292
* Extensive diagnostics: Do not add a location context for do...while statements.Ted Kremenek2009-04-281-1/+1
| | | | llvm-svn: 70286
* BugReporter (extensive diagnostics): Clean up do...while control-flow edges, andTed Kremenek2009-04-281-7/+33
| | | | | | add "Looping back to the head of the loop" diagnostic for loops. llvm-svn: 70285
* CFG: Add "loop back" block for do...while statements.Ted Kremenek2009-04-281-1/+11
| | | | llvm-svn: 70284
* Emit keyword extension warning in all modes, not just C99 mode.Eli Friedman2009-04-282-3/+5
| | | | llvm-svn: 70283
* Remove unused LangOptions NoExtensions and Boolean.Eli Friedman2009-04-284-9/+2
| | | | llvm-svn: 70282
* Simplify the scheme used for keywords, and change the classification Eli Friedman2009-04-2812-265/+243
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | scheme to be more useful. The new scheme introduces a set of categories that should be more readable, and also reflects what we want to consider as an extension more accurately. Specifically, it makes the "what is a keyword" determination accurately reflect whether the keyword is a GNU or Microsoft extension. I also introduced separate flags for keyword aliases; this is useful because the classification of the aliases is mostly unrelated to the classification of the original keyword. This patch treats anything that's in the implementation namespace (prefixed with "__", or "_X" where "X" is any upper-case letter) as a keyword without marking it as an extension. This is consistent with the standards in that an implementation is allowed to define arbitrary extensions in the implementation namespace without violating the standard. This gets rid of all the nasty "extension used" warnings for stuff like __attribute__ in -pedantic mode. We still warn for extensions outside of the the implementation namespace, like typeof. If someone wants to implement -Wextensions or something like that, we could add additional information to the keyword table. This also removes processing for the unused "Boolean" language option; such an extension isn't supported on any other C implementation, so I don't see any point to adding it. The changes to test/CodeGen/inline.c are required because previously, we weren't actually disabling the "inline" keyword in -std=c89 mode. I'll remove Boolean and NoExtensions from LangOptions in a follow-up commit. llvm-svn: 70281
* CFG: 'WhileStmts' needs an extra block to indicate the "loop back" path.Ted Kremenek2009-04-281-5/+10
| | | | llvm-svn: 70280
* We avoid the count of diagnostics when not generating carentMike Stump2009-04-281-3/+4
| | | | | | diagnostics to improve gcc compatibility; useful for dejagnu testing. llvm-svn: 70278
* Don't allow blocks to be declared as returning an array. Radar 6441502Mike Stump2009-04-283-0/+11
| | | | llvm-svn: 70277
* CFG:Ted Kremenek2009-04-282-14/+28
| | | | | | | | - Add 'LoopTarget' pointer field to CFGBlock. This records if the block is used as the 'loop back' path back to the head of a loop. - For ForStmt, encode the loop back target as the increment code. llvm-svn: 70274
* Get rid of some useless uses of NoExtensions. The philosophy here is Eli Friedman2009-04-284-9/+5
| | | | | | | | | | | | that if we're going to print an extension warning anyway, there's no point to changing behavior based on NoExtensions: it will only make error recovery worse. Note that this doesn't cause any behavior change because NoExtensions isn't used by the current front-end. I'm still considering what to do about the remaining use of NoExtensions in IdentifierTable.cpp. llvm-svn: 70273
* A couple more small changes which are probably required for Cygwin Eli Friedman2009-04-272-2/+2
| | | | | | builds to work (PR4088). llvm-svn: 70269
* Attempt to fix reported build error on Cygwin, PR4088.Eli Friedman2009-04-271-1/+1
| | | | llvm-svn: 70268
* While generating debug info ignore unnamed fields.Devang Patel2009-04-271-0/+8
| | | | llvm-svn: 70266
* Add a header containing the Clang version; make the driver use thisDouglas Gregor2009-04-277-18/+92
| | | | | | | | | Clang version value rather than hard-coding "1.0". Add PCH and Clang version information into the PCH file. Reject PCH files with the wrong version information. llvm-svn: 70264
* fix test/PCH/method_pool.mChris Lattner2009-04-271-1/+1
| | | | llvm-svn: 70263
* -E, -Eonly and -parse-noop now work with PCH!Chris Lattner2009-04-272-9/+15
| | | | llvm-svn: 70259
* Teach PCH that ASTContext is optional. Move -parse-noop and -Eonly (so far)Chris Lattner2009-04-275-181/+190
| | | | | | | processing to after PCH is loaded. -Eonly and -parse-noop are close to working with PCH now but are not quite there yet. llvm-svn: 70257
* Track down return statements in the handlers of a function-try-block of ↵Sebastian Redl2009-04-276-1/+60
| | | | | | constructors. Meh ... llvm-svn: 70256
* Be more careful in our teardown of the PCHReader after deciding toDouglas Gregor2009-04-273-0/+28
| | | | | | ignore a PCH file. llvm-svn: 70251
* unnest some code, decoupling fixit rewriting from ast stuff.Chris Lattner2009-04-271-38/+38
| | | | llvm-svn: 70250
* Add -empty-input-only option, for timing.Daniel Dunbar2009-04-271-2/+10
| | | | | | - Forces input file to be empty to time startup/shutdown costs. llvm-svn: 70249
* Don't allow catch declarations to name an abstract classSebastian Redl2009-04-272-0/+8
| | | | llvm-svn: 70248
* Improve validation of C++ exception handling: diagnose throwing incomplete ↵Sebastian Redl2009-04-278-35/+138
| | | | | | types and jumps into protected try-catch scopes. llvm-svn: 70242
* Add Sema::ExtVectorDecls and Sema::ObjCCategoryImpls to the PCH file. Since ↵Douglas Gregor2009-04-276-1/+80
| | | | | | these vectors are very, very rarely used and, when used in headers, and even when used are relatively small, we load them eagerly. llvm-svn: 70240
* Add two new checker-specific attributes: 'objc_ownership_release' andTed Kremenek2009-04-279-8/+70
| | | | | | | 'objc_ownership_cfrelease'. These are the 'release' equivalents of 'objc_ownership_retain' and 'objc_ownership_cfretain' respectively. llvm-svn: 70235
* Track objects in GC mode returned by 'alloc', 'new', etc. methods. These areTed Kremenek2009-04-272-21/+55
| | | | | | treated as "not owned" objects. llvm-svn: 70232
* make these be unsigned now that they are eagerly created.Chris Lattner2009-04-271-4/+4
| | | | llvm-svn: 70229
* shrink SOURCE_LOCATION_OFFSETS to use 4-byte entries instead of 8-byteChris Lattner2009-04-273-4/+4
| | | | | | entries, shaving 100K off the PCH file for cocoa. llvm-svn: 70228
* Fix a problem with the RUN line of one of the PCH testsDouglas Gregor2009-04-271-1/+1
| | | | llvm-svn: 70227
* Refactor HandleObjCOwnershipRetainAttr and HandleObjCOwnershipCFRetainAttr intoTed Kremenek2009-04-271-19/+26
| | | | | | HandleObjCOwnershipParmAttr. No functionality change (hopefully). llvm-svn: 70224
* Implement caching of stat() calls for precompiled headers, which isDouglas Gregor2009-04-279-11/+316
| | | | | | | | essentially the same thing we do with pretokenized headers. stat() caching improves performance of the Cocoa-prefixed "Hello, World" by 45%. llvm-svn: 70223
* x86-32 ABI: Fix crash on return of structure with flexible arrayDaniel Dunbar2009-04-272-4/+13
| | | | | | | | member. Also, spell bitfield more consistently as bit-field. llvm-svn: 70220
* Add new checker-specific attribute 'objc_ownership_cfretain'. This is the sameTed Kremenek2009-04-279-6/+68
| | | | | | | | as 'objc_ownership_cfretain' except that the method acts like a CFRetain instead of a [... retain] (important in GC modes). Checker support is wired up, but currently only for Objective-C message expressions (not function calls). llvm-svn: 70218
* Fill in the C++ status table for exceptionsSebastian Redl2009-04-271-10/+80
| | | | llvm-svn: 70217
* encode the type and decl offsets with 32-bits for entry insteadChris Lattner2009-04-274-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of 64 bits. This cuts 400KB off the PCH file for cocoa (7.1 -> 6.7MB): Before: Record Histogram: Count # Bits % Abv Record Kind 1 14296 SOURCE_LOCATION_PRELOADS 1 1699598 100.00 SOURCE_LOCATION_OFFSETS 1 1870766 100.00 METHOD_POOL 1 212988 100.00 SELECTOR_OFFSETS 1 88 STATISTICS 1 106 SPECIAL_TYPES 1 18033788 100.00 IDENTIFIER_TABLE 1 1806428 100.00 IDENTIFIER_OFFSET 1 170 100.00 TARGET_TRIPLE 1 268 LANGUAGE_OPTIONS 1 5168252 100.00 DECL_OFFSET 1 952700 100.00 TYPE_OFFSET After: Record Histogram: Count # Bits % Abv Record Kind 1 14296 SOURCE_LOCATION_PRELOADS 1 1699598 100.00 SOURCE_LOCATION_OFFSETS 1 1870766 100.00 METHOD_POOL 1 212988 100.00 SELECTOR_OFFSETS 1 88 STATISTICS 1 106 SPECIAL_TYPES 1 18033788 100.00 IDENTIFIER_TABLE 1 1806428 100.00 IDENTIFIER_OFFSET 1 170 100.00 TARGET_TRIPLE 1 268 LANGUAGE_OPTIONS 1 2584156 100.00 DECL_OFFSET 1 476380 100.00 TYPE_OFFSET llvm-svn: 70216
* add an abbreviation for common PARM_VAR_DECL. All but 9 of the Chris Lattner2009-04-275-8/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | parm var decls in leopard cocoa.h end up using this abbreviation, which shrinks the bitcode file by about 50K: 7217736->7167120. Before: Block ID #12 (DECLS_BLOCK): Num Instances: 1 Total Size: 2.23595e+07b/2.79494e+06B/698736W % of file: 38.7233 Num SubBlocks: 0 Num Abbrevs: 0 Num Records: 139387 % Abbrev Recs: 0 After: Block ID #12 (DECLS_BLOCK): Num Instances: 1 Total Size: 2.02405e+07b/2.53006e+06B/632516W % of file: 35.301 Num SubBlocks: 0 Num Abbrevs: 1 Num Records: 139387 % Abbrev Recs: 19.2902 llvm-svn: 70199
OpenPOWER on IntegriCloud