aboutsummaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)Author
2012-09-26Have ASTUnit::Save() return a bool to indicate save error.Argyrios Kyrtzidis
Removes a dependency of ASTUnit to clang-c/Index.h. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164704 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-26Fix the AST representation for non-type template arguments to encodeEli Friedman
enough information so we can mangle them correctly in cases involving dependent parameter types. (This specifically impacts cases involving null pointers and cases involving parameters of reference type.) Fix the mangler to use this information instead of trying to scavenge it out of the parameter declaration. <rdar://problem/12296776>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164656 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-25[libclang] Do a AST concurrency check in clang_indexTranslationUnit_Impl.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164626 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-19ccc-analyzer: pass -stdlib=libc++ through to the analyzer.Benjamin Kramer
Otherwise clang can't analyze code that relies on features provided by libc++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164262 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-18Follow up on llvm r164132.Roman Divacky
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164133 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-15Use LLVM_DELETED_FUNCTION in place of 'DO NOT IMPLEMENT' comments.Dmitri Gribenko
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163983 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-15Revert "Utilize new build system support in Xcode 4.5 for easier interposition"Ted Kremenek
It's not clear if this is working yet on the buildbot. Reverting until we have time to investigate. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163963 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-14Utilize new build system support in Xcode 4.5 for easier interpositionTed Kremenek
of a build without needing to use ccc-analyzer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163927 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-14scan-build: Determine the location of the clang binary before printing help.Jordan Rose
We need the clang executable to print the list of available checkers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163925 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-12PR13811: Add a FunctionParmPackExpr node to handle references to functionRichard Smith
parameter packs where the reference is not being expanded but the pack has been. Previously, Clang would segfault in such cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163672 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-11Just revert r163605 for now. It broke the build and had someChandler Carruth
questionable elements to the patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163609 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-11Select the correct, or, failing that, compatible, dialect when invoked as cc,David Chisnall
c89, c99, and so on. No change to the default dialect when invoked as clang / clang++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163605 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-10[libclang] Do index 'extern' declarations inside functions.Argyrios Kyrtzidis
rdar://12257073 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163563 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-10Comment AST: TableGen'ize all command lists in CommentCommandTraits.cpp.Dmitri Gribenko
Now we have a list of all commands. This is a good thing in itself, but it also enables us to easily implement typo correction for command names. With this change we have objects that contain information about each command, so it makes sense to resolve command name just once during lexing (currently we store command names as strings and do a linear search every time some property value is needed). Thus comment token and AST nodes were changed to contain a command ID -- index into a tables of builtin and registered commands. Unknown commands are registered during parsing and thus are also uniformly assigned an ID. Using an ID instead of a StringRef is also a nice memory optimization since ID is a small integer that fits into a common bitfield in Comment class. This change implies that to get any information about a command (even a command name) we need a CommandTraits object to resolve the command ID to CommandInfo*. Currently a fresh temporary CommandTraits object is created whenever it is needed since it does not have any state. But with this change it has state -- new commands can be registered, so a CommandTraits object was added to ASTContext. Also, in libclang CXComment has to be expanded to include a CXTranslationUnit so that all functions working on comment AST nodes can get a CommandTraits object. This breaks binary compatibility of CXComment APIs. Now clang_FullComment_getAsXML(CXTranslationUnit TU, CXComment CXC) doesn't need TU parameter anymore, so it was removed. This is a source-incompatible change for this C API. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163540 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-10Workaround for MacOSX build failure with gcc <= 4.4Alexander Kornienko
Summary: A better solution to http://llvm.org/bugs/show_bug.cgi?id=13777 Named namespace + more unique name to make ODR violations unlikely. Reviewers: chandlerc, doug.gregor, klimek Reviewed By: doug.gregor CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D38 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163513 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-07Fixed http://llvm.org/bugs/show_bug.cgi?id=13777Alexander Kornienko
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163429 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-04Revert r163083 per chandlerc's request.Joao Matos
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163149 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-04Revert r163099 per chandlerc's request.Joao Matos
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163147 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-03Added a new cursor for SEHLeaveStmt to libclang.Joao Matos
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163099 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-02Implemented parsing and AST support for the MS __leave exception statement. ↵Joao Matos
Also a minor fix to __except printing in StmtPrinter.cpp. Thanks to Aaron Ballman for review. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163083 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-01[libclang] Fix indexing type alias declarations. rdar://11878406Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163072 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-01[libclang] The annotation of tokens operation visits statement nodes ↵Argyrios Kyrtzidis
code-recursively. This can blow the stack with extremely deep hierarchies. Switch it to data-recursive. This is implemented by introducing a post-children visitation callback that the CursorVisitor is calling after child nodes of a cursor have been visited. This is used by the annotate-tokens visitor to do extra work at that point. rdar://11979525. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163071 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-01Comment that clang.dll is unavailable on cygming yet.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163055 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-01c-arcmt-test/Makefile: Restore some stuff. clang.dll is unavailable on ↵NAKAMURA Takumi
cygming yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163054 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-01Tweak link order to hopefully resolve a buildbot failure.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163052 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-01Split library clangRewrite into clangRewriteCore and clangRewriteFrontend.Ted Kremenek
This is similar to how we divide up the StaticAnalyzer libraries to separate core functionality to what is clearly associated with Frontend actions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163050 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-31Normalize line endings of r163013 (part 2).Joao Matos
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163032 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-31Fix the build (-Wswitch violation introduced by r163013).David Blaikie
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163025 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-31Normalize line endings of r163013.Joao Matos
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163024 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-31Improved MSVC __interface support by adding first class support for it, ↵Joao Matos
instead of aliasing to "struct" which had some incorrect behaviour. Patch by David Robins. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163013 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-30Fix C++ comment in C sourceMichael Liao
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162887 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-29Use double instead of single quote to expand .Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162830 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-28Fix passing of -analyzer-max-loop from scan-build to clang.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162765 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-28[libclang] When determining the cursor via a location, ignore synthesized ↵Argyrios Kyrtzidis
ivars otherwise if we have something like: @synthesize prop = _prop; and '_prop' is not declared, we will encounter a '_prop' ivar before encountering the 'prop' synthesize declaration and we will think that we passed the region-of-interest, missing the cursor for 'prop'. rdar://12172700 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162715 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-27[ms-inline asm] Rename getClobber to getClobberStringLiteral. No functionalChad Rosier
change intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162710 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-25Change --with-analyzer to --use-analyzer, per sage feedback from Jordan.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162640 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-25[ms-inline asm] As part of a larger refactoring, rename AsmStmt to GCCAsmStmt.Chad Rosier
No functional change intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162632 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-24Fix a few issues related to -with-analyzer reported by Jordan. Let'sTed Kremenek
have the option with two '--' to be consistent with other options. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162625 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-24Rework how scan-build picks the version of clang to use for static analysis.Ted Kremenek
Unless the user specifies, the clang used for static analysis is the one found relative to scan-build. If the user specifies -with-analyzer, they can pick either to use the clang bundled with Xcode (via xcrun) or they can specify a path to clang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162620 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-24Reformat help text for scan-build, and remove -constraintsTed Kremenek
and -store from help text because they are no longer relevant to users. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162619 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-24Revert "Go ahead and show experimental checkers in the scan-build "-h" output."Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162587 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-24Go ahead and show experimental checkers in the scan-build "-h" output.Ted Kremenek
They are labeled as not being enabled-by-default, and how else are users going to test them. Fixes <rdar://problem/11654923> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162543 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-24On OS X, use xcrun (if present) to find the clang to use for static analysis ifTed Kremenek
no clang can be found relative to the location of scan-build. Fixes <rdar://problem/11691794> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162535 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-24Updated LibTooling.html, minor improvements in CommonOptionsParserAlexander Kornienko
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162521 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-23[scan-build] Accept -fno-objc-arc as well as -fobjc-arc.Jordan Rose
This is how Xcode lets individual files be marked as non-ARC when the rest of the project is ARC-enabled, so this is necessary for scan-build xcodebuild. Patch by Paul Eipper! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162497 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-23Fix a bunch of -Wdocumentation warnings.Dmitri Gribenko
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162452 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-22[libclang] c-index-test: Make the printing of the overrides list of a cursor inArgyrios Kyrtzidis
a deterministic order, to avoid random test failures. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162408 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-22Reverted clang-check to fully supported CommandLine Library use-case: globalAlexander Kornienko
static variables. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162391 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-13Implemented -ast-dump, -ast-print, -ast-dump-filter options in clang-checkAlexander Kornienko
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161753 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-11Attaching comments to declarations: find comment attached to any redeclarationDmitri Gribenko
Not only look for the comment near the declaration itself, but also walk the redeclaration chain: the previous declaration might have had a documentation comment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161722 91177308-0d34-0410-b5e6-96231b3b80d8