aboutsummaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)Author
2013-03-26Manually specify the link dependencies. Turns out that all the work onChandler Carruth
LLVMBuild stuff didn't actually provide a single place for dependencies, it just added a third place. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177989 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-26The IRReader header is now part of its own library. Update the includeChandler Carruth
line and the library dependencies to reflect this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177972 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-22Add clang-format to the corresponding Makefile.Daniel Jasper
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177727 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-22OpenMP threadprivate directive parsing and semantic analysisAlexey Bataev
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177705 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-21[analyzer] scan-build: emit errors on stderr, and exit(1) instead of exit(0).Jordan Rose
PR14963 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177678 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-20Add clang-format binary to cfe.Daniel Jasper
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177506 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-18[libclang] Modify clang_getCursorType to be able to handle a function ↵Argyrios Kyrtzidis
template decl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177359 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-14[analyzer] Fix scan-build's -stats mode.Jordan Rose
We were failing to match the output line, which led to us collecting no stats at all, which led to a divide-by-zero error. Fixes PR15510. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177084 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-13[Modules] Resolve top-headers of modules lazily.Argyrios Kyrtzidis
This allows resolving top-header filenames of modules to FileEntries when we need them, not eagerly. Note that that this breaks ABI for libclang functions clang_Module_getTopLevelHeader / clang_Module_getNumTopLevelHeaders but this is fine because they are experimental and not widely used yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176975 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-11[libclang] Fix a test and a warning on windows.Argyrios Kyrtzidis
Patch by Guy Benyei! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176806 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-10Driver: do not strip file extensions when printing diagnostics.Benjamin Kramer
Before: clang-3: error: no input files After: clang-3.3: error: no input files This means that we'll also print clang.exe on windows, but I don't see a problem with that. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176788 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-08[libclang] Change clang_findReferencesInFile and clang_findIncludesInFile to ↵Argyrios Kyrtzidis
return an enum, as suggested by Jordan. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176732 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-08[libclang] Modify clang_findReferencesInFile and clang_findIncludesInFile to ↵Argyrios Kyrtzidis
return a value. Possible values are: 1 : if a parameter was invalid -1 : if the callback returned CXVisit_Break, otherwise returns 0. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176716 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-08[libclang] Introduce clang_findIncludesInFile, that can be used to retrieve ↵Argyrios Kyrtzidis
all #import/#include directives in a specific file. It passes to the visitor, that the caller provides, CXCursor_InclusionDirective cursors for all the include directives in a particular file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176682 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-08[libclang] When calling the function of CXCursorAndRangeVisitor, don't forget toArgyrios Kyrtzidis
stop visitation if it returns CXVisit_Break. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176681 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-08[libclang] Add Logger::operator<< overloads for CXCursor and FileEntry.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176680 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-05[libclang] When logging a CXTranslationUnit that came from an AST file, ↵Argyrios Kyrtzidis
print out the filename. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176511 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-05scan-build: explicitly say "No bugs found" if there are no reports.Jordan Rose
Patch by Martin Storsjo! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176472 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-01Fix typos: [Dd]iagnosic -> [Dd]iagnosticStefanus Du Toit
These all appear in comments or (ironically) diagnostics output. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176383 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-26doxygen command. Add 'attention' command to list of similarFariborz Jahanian
doxygen commands. // rdar://12379053 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176127 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-24[preprocessor] Use MacroDirective in the preprocessor callbacks to make ↵Argyrios Kyrtzidis
available the full information about the macro (e.g if it was imported and where). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175978 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-23Revert r175912, "Add support for coldcc to clang" at John's request.Peter Collingbourne
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175936 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-22Add support for coldcc to clangPeter Collingbourne
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175912 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-22Suppress -Wswitch to unbreak the build.David Blaikie
This may need to be fixed more intelligently - I don't have enough context to be sure what the appropriate fix is right now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175902 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-22[Sema] Semantic analysis for empty-declaration and attribute-declaration.Michael Han
Introduce a new AST Decl node "EmptyDecl" to model empty-declaration. Have attributes from attribute-declaration appertain to the EmptyDecl node by creating the AST representations of these attributes and attach them to the EmptyDecl node so these attributes can be sema checked just as attributes attached to "normal" declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175900 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-22Streamify getNameForDiagnostic and remove the string versions of ↵Benjamin Kramer
PrintTemplateArgumentList. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175894 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-22scan-build: Remove debug print.Benjamin Kramer
PR15329. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175889 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-21[scan-build] Add quotes around clang executable name to handle path withs ↵Ted Kremenek
spaces. Fixes <rdar://problem/13254727> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175790 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-21[scan-build] fix xcode version parsing to handle dot releases. Fixes ↵Ted Kremenek
<rdar://problem/13265300>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175781 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-21[driver] Handle the processing of the QA_OVERRIDE_GCC3_OPTIONS and CCC_ADD_ARGSChad Rosier
before the DiagnosticsEngine is instantiated. Otherwise, warning options are not handled correctly. rdar://13254743 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175779 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-21CIndex.cpp: Appease g++-4.4. "if (Optional<unsigned> Minor = In.getMinor())" ↵NAKAMURA Takumi
did not work as expected. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175711 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-21Use None rather than Optional<T>() where possible.David Blaikie
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175705 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-21Strip 'llvm' from 'llvm::Optional' uses.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175701 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-20[preprocessor] Split the MacroInfo class into two separate concepts, ↵Argyrios Kyrtzidis
MacroInfo class for the data specific to a macro definition (e.g. what the tokens are), and MacroDirective class which encapsulates the changes to the "macro namespace" (e.g. the location where the macro name became active, the location where it was undefined, etc.) (A MacroDirective always points to a MacroInfo object.) Usually a macro definition (MacroInfo) is where a macro name becomes active (MacroDirective) but splitting the concepts allows us to better model the effect of modules to the macro namespace (also as a bonus it allows better modeling of push_macro/pop_macro #pragmas). Modules can have their own macro history, separate from the local (current translation unit) macro history; MacroDirectives will be used to model the macro history (changes to macro namespace). For example, if "@import A;" imports macro FOO, there will be a new local MacroDirective created to indicate that "FOO" became active at the import location. Module "A" itself will contain another MacroDirective in its macro history (at the point of the definition of FOO) and both MacroDirectives will point to the same MacroInfo object. Introducing the separation of macro concepts is the first part towards better modeling of module macros. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175585 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-18Replace TypeLoc llvm::cast support to be well-defined.David Blaikie
The TypeLoc hierarchy used the llvm::cast machinery to perform undefined behavior by casting pointers/references to TypeLoc objects to derived types and then using the derived copy constructors (or even returning pointers to derived types that actually point to the original TypeLoc object). Some context is in this thread: http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-December/056804.html Though it's spread over a few months which can be hard to read in the mail archive. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175462 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-18libclang: don't store nul-terminated strings as StringRefs,Dmitri Gribenko
if the nul-terminatedness property is important for clients. Also, don't return the same CXString multiple times. This did not create a correctness issue in practice because the CXString was of an CXS_Unmanaged kind, and destruction was a no-op. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175455 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-16libclang: remove reinterpret_casts by using SourceLocation::getPtrEncodingDmitri Gribenko
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175333 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-15libclang: add clang_getTypeSpelling(CXType CT)Dmitri Gribenko
Adds a function clang_getTypeSpelling(CXType CT) that returns a CXString containing the underlying type. Patch by Ben Gertzfield. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175299 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-14libclang: remove reinterpret_casts by using SourceLocation::getFromPtrEncodingDmitri Gribenko
directly instead of casting a pointer to an integer git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175206 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-14Teach ccc-analyze to pass on -iquote with no spaces between it an the argument.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175115 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-13Use 'RC_XBS' instead of 'RC_BUILDIT' to catch all times when it's built in ↵Bill Wendling
the Apple way. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175070 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-13[libclang] Fix annotation of a range where the begin or end locationArgyrios Kyrtzidis
is inside a macro argument. Previously we would give up and not annotate anything in the range. rdar://11891550 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175062 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-09libclang: use CXCursor getters to simplify codeDmitri Gribenko
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174809 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08Excise <cctype> from Clang (except clang-tblgen) in favor of CharInfo.h.Jordan Rose
Nearly all of these changes are one-to-one replacements; the few that aren't have to do with custom identifier validation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174768 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08[libclang] Attribute visitation happens out-of-source-order, make sureArgyrios Kyrtzidis
we annotate properly when there is an attribute and not skip type specs if the attribute is after the declaration. rdar://13129077 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174689 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07libclang: reduce CXString abuseDmitri Gribenko
ContainerUSR is not really a CXString, but it should own the underlying memory buffer. Thus, it is better to change the type to std::string. This will not introduce extra copying overhead, since the workaround that is being removed was already making a copy. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174647 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07libclang: CursorVisitor::VisitBuiltinTypeLoc(): Add OCLSampler. [-Wswitch]NAKAMURA Takumi
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174606 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07Add OpenCL samplers as Clang builtin types and check sampler related ↵Guy Benyei
restrictions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174601 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-03Comment to XML conversion: replace string comparison with command ID comparisonDmitri Gribenko
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174290 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-03libclang: wrap CXString implementation into 'namespace cxstring'Dmitri Gribenko
This removes quite a few 'cxstring::' qualifications where they are obvious. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174286 91177308-0d34-0410-b5e6-96231b3b80d8