summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Sort all of Clang's files under 'lib', and fix up the broken headersChandler Carruth2012-12-04316-1030/+977
| | | | | | | | | | | | | uncovered. This required manually correcting all of the incorrect main-module headers I could find, and running the new llvm/utils/sort_includes.py script over the files. I also manually added quite a few missing headers that were uncovered by shuffling the order or moving headers up to be main-module-headers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169237 91177308-0d34-0410-b5e6-96231b3b80d8
* clang/Lex: [CMake] Update CMakefiles since r169229.NAKAMURA Takumi2012-12-041-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169233 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor recording the preprocessor conditional directive regions out ofArgyrios Kyrtzidis2012-12-047-115/+138
| | | | | | | | | PreprocessingRecord and into its own class, PPConditionalDirectiveRecord. Decoupling allows a client to use the functionality of PPConditionalDirectiveRecord without needing a PreprocessingRecord. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169229 91177308-0d34-0410-b5e6-96231b3b80d8
* In the PreprocessingRecord, to identify the different conditional directive ↵Argyrios Kyrtzidis2012-12-041-16/+19
| | | | | | | | regions use the SourceLocation at the start of the respective region, instead of a unique integer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169228 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce CompilationDatabase::getAllCompileCommands() that returns allArgyrios Kyrtzidis2012-12-042-9/+30
| | | | | | compile commands of the database and expose it via the libclang API. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169226 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a 'count' field to the DWARF subrange.Bill Wendling2012-12-041-5/+18
| | | | | | | | | | The count field is necessary because there isn't a difference between the 'lo' and 'hi' attributes for a one-element array and a zero-element array. When the count is '0', we know that this is a zero-element array. When it's >=1, then it's a normal constant sized array. When it's -1, then the array is unbounded. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169219 91177308-0d34-0410-b5e6-96231b3b80d8
* Testing objective-C declarations embedded inFariborz Jahanian2012-12-041-1/+11
| | | | | | | | | <declaration> tag of Comment XML and fixed a missing declaration of ivars private to @implementation as result of the testing. // rdar://12378714 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169193 91177308-0d34-0410-b5e6-96231b3b80d8
* Have clang use LLVM IR's fast-math flags when in FastMath or FiniteMathOnly ↵Michael Ilseman2012-12-041-0/+10
| | | | | | modes. Test cases included. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169191 91177308-0d34-0410-b5e6-96231b3b80d8
* remove trailing whitespaceMichael Ilseman2012-12-041-32/+32
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169187 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix test failure when building Clang with g++4.7 -- don't use a Twine temporaryRichard Smith2012-12-031-5/+5
| | | | | | | after its lifetime has ended! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169170 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixes a compile warning and crash in the tests.Manuel Klimek2012-12-031-12/+13
| | | | | | | | The necessity of this fix points to a problem with the design of the addToken during the optimiation phase, which we need to address in a much more principled way. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169151 91177308-0d34-0410-b5e6-96231b3b80d8
* Add Clang flags -fsanitize-blacklist and -fno-sanitize-blacklist. Make this ↵Alexey Samsonov2012-12-034-6/+32
| | | | | | flag usable for ASan. Blacklisting can be used to disable sanitizer checks for particular file/function/object. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169144 91177308-0d34-0410-b5e6-96231b3b80d8
* libclangFormat is not libclangTooling, but it depends on it.Benjamin Kramer2012-12-032-2/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169139 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR14474: don't emit debug info for interface types in -gline-tables-only ↵Alexey Samsonov2012-12-031-3/+3
| | | | | | mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169138 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial version of formatting library.Daniel Jasper2012-12-037-1/+1203
| | | | | | | | | | | | | | This formatting library will be used by a stand-alone clang-format tool and can also be used when writing other refactorings. Manuel's original design document: https://docs.google.com/a/google.com/document/d/1gpckL2U_6QuU9YW2L1ABsc4Fcogn5UngKk7fE5dDOoA/edit The library can already successfully format itself. Review: http://llvm-reviews.chandlerc.com/D80 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169137 91177308-0d34-0410-b5e6-96231b3b80d8
* Add -fsanitize=memory.Evgeniy Stepanov2012-12-033-0/+40
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169124 91177308-0d34-0410-b5e6-96231b3b80d8
* [ubsan] Add flag to enable recovery from checks when possible.Will Dietz2012-12-026-13/+37
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169114 91177308-0d34-0410-b5e6-96231b3b80d8
* Make helper classes anonymous. Make helper functions static instead of ↵Benjamin Kramer2012-12-012-155/+158
| | | | | | | | private members so the anonymous class doesn't leak out. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169099 91177308-0d34-0410-b5e6-96231b3b80d8
* [MIPS] Add -mxgot/-mno-xgot command line optionsSimon Atanasyan2012-12-011-0/+7
| | | | | | | to enable/disable support of GOT larger than 64k. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169098 91177308-0d34-0410-b5e6-96231b3b80d8
* Add raw_ostream include to pacify MSVC.Benjamin Kramer2012-12-011-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169097 91177308-0d34-0410-b5e6-96231b3b80d8
* Include pruning and general cleanup.Benjamin Kramer2012-12-0129-13/+51
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169095 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't include Type.h in DeclarationName.h.Benjamin Kramer2012-12-018-1/+23
| | | | | | Recursively prune some includes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169094 91177308-0d34-0410-b5e6-96231b3b80d8
* Pull the Attr iteration parts out of Attr.h, so including DeclBase.h doesn't ↵Benjamin Kramer2012-12-0134-73/+153
| | | | | | | | | pull in all the generated Attr code. Required to pull some functions out of line, but this shouldn't have a perf impact. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169092 91177308-0d34-0410-b5e6-96231b3b80d8
* Consistently use 'needsImplicit<special member>' to determine whether we needRichard Smith2012-12-013-20/+21
| | | | | | | | an implicit special member, rather than sometimes using '!hasDeclared<special member>'. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169075 91177308-0d34-0410-b5e6-96231b3b80d8
* Try to make the source location information for token pastes a bit more ↵Eli Friedman2012-12-011-0/+6
| | | | | | | | | | | consistent. Fixes a crash printing diagnostics on the gcc testsuite, and also makes diagnostic range printing print nicer results for token pastes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169068 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove restriction on combining ubsan with asan or tsan. This has worked for ↵Richard Smith2012-12-011-5/+4
| | | | | | a while. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169066 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the determination of whether a capture refers to an enclosingDouglas Gregor2012-12-011-3/+4
| | | | | | | scope when dealing with nested blocks. Fixes <rdar://problem/12778708>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169065 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't emit a warning with an input/output parameter. We assume the user ↵Bill Wendling2012-11-301-1/+3
| | | | | | knows what they're doing here. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169059 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach the serialized diagnostic writer to clone() itself, sharingDouglas Gregor2012-11-301-67/+112
| | | | | | | | | | | state so that all of the various clones end up rendering their diagnostics into the same serialized-diagnostics file. This is important when we actually want failures during module build to be reported back to the translation unit that tried to import the not-yet-built or out-of-date module. <rdar://problem/12565727> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169057 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't warn if the input size is less than the register size. Also don't warn ifBill Wendling2012-11-301-1/+3
| | | | | | | | the output size is greater than the register size. No truncation occurs with those. Reword warning to make it clearer what's the problem is. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169054 91177308-0d34-0410-b5e6-96231b3b80d8
* Make -Wtautological-constant-out-of-range-compare behave sanely for enums ↵Eli Friedman2012-11-301-4/+3
| | | | | | | | | | with a signed fixed type. <rdar://problem/12780159>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169051 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename ModuleBuildPath -> ModuleBuildStack. Thanks, Dmitri!Douglas Gregor2012-11-302-16/+16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169045 91177308-0d34-0410-b5e6-96231b3b80d8
* When we're emitting a diagnostic with a source location in an importedDouglas Gregor2012-11-303-8/+103
| | | | | | | | | | | | | | | module, provide a module import stack similar to what we would get for an include stack, e.g., In module 'DependsOnModule' imported from build-fail-notes.m:4: In module 'Module' imported from DependsOnModule.framework/Headers/DependsOnModule.h:1: Inputs/Module.framework/Headers/Module.h:15:12: note: previous definition is here @interface Module <rdar://problem/12696425> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169042 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixing a precedence issue with my previous commit.Aaron Ballman2012-11-301-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169041 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixing an MSVC warning about an unsafe mixture of Boolean and unsigned types ↵Aaron Ballman2012-11-301-1/+1
| | | | | | in a logical operator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169037 91177308-0d34-0410-b5e6-96231b3b80d8
* Comments: no need to escape any characters in \code ... \endcode.Dmitri Gribenko2012-11-301-6/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169030 91177308-0d34-0410-b5e6-96231b3b80d8
* Support for #pragma region/endregion for MSVC compatibility. Patch thanks ↵Aaron Ballman2012-11-301-0/+25
| | | | | | to pravic! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169028 91177308-0d34-0410-b5e6-96231b3b80d8
* Actually keep track of the source locations at which particular moduleDouglas Gregor2012-11-302-6/+11
| | | | | | | files are loaded. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169027 91177308-0d34-0410-b5e6-96231b3b80d8
* When an error occurs while building a module on demand, provide "WhileDouglas Gregor2012-11-303-15/+68
| | | | | | | | | | building module 'Foo' imported from..." notes (the same we we provide "In file included from..." notes) in the diagnostic, so that we know how this module got included in the first place. This is part of <rdar://problem/12696425>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169021 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow matchers to access the ASTContext.Manuel Klimek2012-11-301-0/+3
| | | | | | Patch by Edwin Vane. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169000 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the computation of highlight ranges so we produce something sane whenEli Friedman2012-11-301-10/+30
| | | | | | | | | the beginning and end of the range are in different macro arguments. PR14399. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168984 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor to reduce duplication in handling of special member functions. No ↵Richard Smith2012-11-304-210/+94
| | | | | | functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168977 91177308-0d34-0410-b5e6-96231b3b80d8
* Keep track of modules that have failed to build. If we encounter anDouglas Gregor2012-11-292-19/+63
| | | | | | | | | | | | | | | import of that module elsewhere, don't try to build the module again: it won't work, and the experience is quite dreadful. We track this information somewhat globally, shared among all of the related CompilerInvocations used to build modules on-the-fly, so that a particular Clang instance will only try to build a given module once. Fixes <rdar://problem/12552849>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168961 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a small calling-convention bug for x86-32. PR14453.Eli Friedman2012-11-291-2/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168959 91177308-0d34-0410-b5e6-96231b3b80d8
* Add ARM cortex-a5 subtargetQuentin Colombet2012-11-292-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168958 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert commit revision r168953, to change the commit message, which was emptyQuentin Colombet2012-11-292-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168956 91177308-0d34-0410-b5e6-96231b3b80d8
* git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168953 ↵Quentin Colombet2012-11-292-3/+3
| | | | 91177308-0d34-0410-b5e6-96231b3b80d8
* This patch exposes to Clang users three more sanitizers are experimental ↵Alexey Samsonov2012-11-293-10/+33
| | | | | | | | | | | | | | | features of ASan: 1) init-order sanitizer: initialization-order checker. Status: usable, but may produce false positives w/o proper blacklisting. 2) use-after-return sanitizer Status: implemented, but heavily understed. Should be optional, as it significanlty slows program down. 3) use-after-scope sanitizer Status: in progress. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168950 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure that we put the rest of the sanitizer libraries on the link lineEric Christopher2012-11-291-7/+5
| | | | | | before libstdc++ like we do with ubsan. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168918 91177308-0d34-0410-b5e6-96231b3b80d8
* Now that the underlying problem has been fixed, add r168411 back.Rafael Espindola2012-11-291-6/+4
| | | | | | | | Original commit message: Remove redundant code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168900 91177308-0d34-0410-b5e6-96231b3b80d8