summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Tighten up the semantics of default template arguments, per C++0xDouglas Gregor2011-02-042-4/+17
| | | | | | [temp.param]p9 and C++ DR226. Fixes PR8747. llvm-svn: 124856
* When a function template's template parameter has a default argument,Douglas Gregor2011-02-041-2/+2
| | | | | | | | | | it's okay for the following template parameters to not have default arguments (since those template parameters can still be deduced). Also, downgrade the error about default template arguments in function templates to an extension warning, since this is a harmless C++0x extension. llvm-svn: 124855
* build: Add support for DISABLE_DEFAULT_STRICT_ALIASING, which does what oneDaniel Dunbar2011-02-042-3/+10
| | | | | | might expect. llvm-svn: 124848
* minor refactoring of -fapple-kext stuff.Fariborz Jahanian2011-02-041-8/+6
| | | | llvm-svn: 124837
* What was I thinking?Fariborz Jahanian2011-02-041-3/+1
| | | | llvm-svn: 124835
* -fapple-kext cannot have 'weak' visibility in thisFariborz Jahanian2011-02-042-17/+39
| | | | | | abi. llvm-svn: 124834
* If any Fix-Its attached to a diagnostic have invalid source locationsDouglas Gregor2011-02-031-0/+13
| | | | | | | or source locations that refer into a macro instantiation, delete all of the Fix-Its on that diagnostic. llvm-svn: 124833
* Moved here from LLVM Clang's configuration options and related macros.Oscar Fuentes2011-02-032-0/+8
| | | | llvm-svn: 124825
* [analyzer] Fix a crash until we can handle temporary struct objects properly.Argyrios Kyrtzidis2011-02-031-1/+5
| | | | llvm-svn: 124822
* Add __has_feature() for each of the type traitsDouglas Gregor2011-02-031-0/+19
| | | | llvm-svn: 124820
* Clean up of -fapple-kext abi code. No change otherwise.Fariborz Jahanian2011-02-034-12/+10
| | | | llvm-svn: 124807
* Implement -Woverloaded-virtual.Argyrios Kyrtzidis2011-02-032-1/+103
| | | | | | | | | | | | The difference with gcc is that it warns if you overload virtual methods only if the method doesn't also override any method. This is to cut down on the number of warnings and make it more useful like reported here: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20423. If we want to warn that not all overloads are overriden we can have an additional warning like -Wpartial-override. -Woverloaded-virtual, unlike gcc, is added to -Wmost. Addresses rdar://8757630. llvm-svn: 124805
* Teach SourceManager::getLocation() how to cope with a source fileDouglas Gregor2011-02-031-18/+84
| | | | | | | | | | | | | | | | whose inode has changed since the file was first created and that is being seen through a different path name (e.g., due to symlinks or relative path elements), such that its FileEntry pointer doesn't match a known FileEntry pointer. Since this requires a system call (to stat()), we only perform this deeper checking if we can't find the file by comparing FileEntry pointers. Also, add a micro-optimization where we don't bother to compute line numbers when given the location (1, 1). This improves the efficiency of clang_getLocationForOffset(). llvm-svn: 124800
* Capture a few implicit references to 'self'.John McCall2011-02-031-3/+37
| | | | llvm-svn: 124786
* More capturing of 'this': implicit member expressions. Getting thatJohn McCall2011-02-0310-195/+211
| | | | | | | | | | | right for anonymous struct/union members led to me discovering some seemingly broken code in that area of Sema, which I fixed, partly by changing the representation of member pointer constants so that IndirectFieldDecls aren't expanded. This led to assorted cleanups with member pointers in CodeGen, and while I was doing that I saw some random other things to clean up. llvm-svn: 124785
* Revert 124768.Rafael Espindola2011-02-035-25/+21
| | | | | | | This reopens PR99114, but that one at least can be avoided with an #include. PR9130 cannot. llvm-svn: 124780
* Revert 124754 and 124760 as they made clang unusable in the presence of symbolicRafael Espindola2011-02-031-84/+0
| | | | | | links. llvm-svn: 124776
* Frontend: Switch -header-include-file output to use unbuffered raw_ostreams withDaniel Dunbar2011-02-031-14/+22
| | | | | | | | the atomic writes option, since the intent is that this option be set for an entire build, which may have any number of compiler instances writing to the same output file. llvm-svn: 124772
* Don't try to mark virtual members referenced for classes where the key functionAnders Carlsson2011-02-035-21/+25
| | | | | | | | | | | is not defined in the current translation unit. Doing so lead to compile errors such as PR9114. Instead, when CodeGen is building the vtable, don't try to emit a definition for functions that aren't marked used in the current translation unit. Fixes PR9114. llvm-svn: 124768
* Improve the performance of filename canonicalization by avoidingDouglas Gregor2011-02-031-1/+8
| | | | | | redundant searches in the string. No functionality change. llvm-svn: 124760
* Based on user feedback, swap -Wuninitialized diagnostics to have the warning ↵Ted Kremenek2011-02-021-32/+37
| | | | | | refer to the bad use, and the note to the variable declaration. llvm-svn: 124758
* -fapple-kext, elimination of all direct calls to virtual dtors.Fariborz Jahanian2011-02-021-0/+4
| | | | llvm-svn: 124757
* Emit debug info for template value parameters.Devang Patel2011-02-021-0/+7
| | | | llvm-svn: 124756
* Canonicalize path names in the file manager before performing a lookupDouglas Gregor2011-02-021-0/+77
| | | | | | | | | | | | | | | on that name. Canonicalization eliminates silliness such as "." and "foo/.." that breaks the uniquing of files in the presence of virtual files or files whose inode numbers have changed during parsing/re-parsing. c-index-test isn't able to create this crazy situation, so I've resorted to testing outside of the Clang tree. Fixes <rdar://problem/8928220>. Note that this hackery will go away once we have a real virtual file system on which we can layer FileManager; the virtual-files hack is showing cracks. llvm-svn: 124754
* Emit debug info for template type parameters.Devang Patel2011-02-021-1/+18
| | | | llvm-svn: 124753
* clang: Add support for a CC_PRINT_HEADERS environment variable, which mirrorsDaniel Dunbar2011-02-022-2/+8
| | | | | | | CC_PRINT_OPTIONS and can be used to get some out-of-band information on header usage from a build. llvm-svn: 124751
* Frontend: Add -header-include-file option, for allowing saving header includeDaniel Dunbar2011-02-023-7/+41
| | | | | | information to a file. llvm-svn: 124750
* Frontend: Add support (unused) for showing all "interesting" headers, not justDaniel Dunbar2011-02-021-21/+16
| | | | | | ones outside the predefines buffer (which is what -H does). llvm-svn: 124749
* For gcc compatibility, size of a class which is zeroFariborz Jahanian2011-02-021-2/+11
| | | | | | | | but has non-empty data fields, such as array of zero length, remains zero. // rdar://8945175 llvm-svn: 124741
* Revert r124704, which uniqued code-completion strings. The spaceDouglas Gregor2011-02-021-31/+0
| | | | | | | | | savings of 25% sounds impressive, except that this amounted to only about 360k in our standard "large" completion result set (40,000 results). Since code completion is performance-sensitive, the 4% slowdown due to uniquing outweighs the 360k benefit. llvm-svn: 124737
* Add NetBSD target support. Patch by Joerg Sonnenberger.Benjamin Kramer2011-02-028-3/+318
| | | | llvm-svn: 124736
* Don't warn for -Wnon-virtual-dtor for dependent classes.Argyrios Kyrtzidis2011-02-021-1/+1
| | | | llvm-svn: 124735
* Frontend: Factor out header include dumping (-H) into its own preprocessorDaniel Dunbar2011-02-025-39/+99
| | | | | | | | callbacks class. - Aside from being generally cleaner, this also allows -H to work correctly in modes other than standard preprocessing (e.g., -c, -MM, etc.) llvm-svn: 124723
* An insomniac stab at making block declarations list the variables they closeJohn McCall2011-02-0211-117/+203
| | | | | | | on, as well as more reliably limiting invalid references to locals from nested scopes. llvm-svn: 124721
* Turn on -momit-leaf-frame-pointer by default on all non-Darwin platforms.Nick Lewycky2011-02-021-2/+3
| | | | | | Fixes PR9121! llvm-svn: 124718
* Remove redundant check to not warn for warn_equality_with_extra_parens if we ↵Ted Kremenek2011-02-021-11/+6
| | | | | | are in a macro. This is checked twice. llvm-svn: 124714
* Unique code-completion strings. On Cocoa.h, this costs us about 4% inDouglas Gregor2011-02-011-0/+31
| | | | | | speed but saves us about 25% of the memory usage for strings. llvm-svn: 124704
* When diagnosing address-space changes, apply array-to-pointer decay first.John McCall2011-02-011-0/+3
| | | | llvm-svn: 124702
* -fapple-kext support for indirect call to virtuals dtors - wip.Fariborz Jahanian2011-02-014-2/+58
| | | | llvm-svn: 124701
* Add support for x86-64 Mandriva 2010.2. Reported by 'rindolf' on IRC!Nick Lewycky2011-02-011-0/+3
| | | | llvm-svn: 124699
* Create a special allocator class for code completion, so that all ofDouglas Gregor2011-02-013-77/+74
| | | | | | | the string copying goes through a single place that can have associated state. llvm-svn: 124698
* Don't warn about extraneous '()' around a comparison if it occurs within a ↵Ted Kremenek2011-02-011-9/+12
| | | | | | | | | macro. Macros frequently contain extra '()' to make instantiation less error prone. This warning was flagging a ton of times on postgresql because of its use of macros. llvm-svn: 124695
* Don't warn for "if ((a == b))" if the parens came from a macro. Thanks to ↵Argyrios Kyrtzidis2011-02-011-0/+5
| | | | | | Fariborz for the hint! llvm-svn: 124689
* Do the right thing for zero-initializing VLAs that don't have a zeroJohn McCall2011-02-011-5/+60
| | | | | | | bit-pattern. It's not clear that this is actually useful given current language restrictions. llvm-svn: 124685
* Add updated Debian ARM include path.Nick Lewycky2011-02-011-0/+2
| | | | llvm-svn: 124684
* Provide constant strings for certain common code completion strings,Douglas Gregor2011-02-011-22/+90
| | | | | | eliminating the need to copy those strings. llvm-svn: 124683
* Fix the message. Thanks to Thomas Clement for noticing.Argyrios Kyrtzidis2011-02-011-1/+1
| | | | llvm-svn: 124680
* For "if ((a == b))" only warn if 'a' is a modifiable l-value. Caught by John!Argyrios Kyrtzidis2011-02-011-1/+3
| | | | llvm-svn: 124675
* [analyzer] Slightly improve the diagnostic message of ObjCSelfInitChecker.Argyrios Kyrtzidis2011-02-011-2/+2
| | | | llvm-svn: 124674
* Allocate CodeCompletionString and all of its components in aDouglas Gregor2011-02-013-884/+838
| | | | | | | | | | | | BumpPtrAllocator, rather than manually new/delete'ing them. This optimization also allows us to avoid allocating memory for and copying constant strings (e.g., "return", "class"). This also required embedding the priority and availability of results within the code completion string, to avoid extra memory allocation within libclang. llvm-svn: 124673
OpenPOWER on IntegriCloud