summaryrefslogtreecommitdiffstats
path: root/clang/tools
Commit message (Collapse)AuthorAgeFilesLines
...
* Use lexing mode based on FormatStyle.Standard.Alexander Kornienko2013-06-281-3/+4
| | | | | | | | | | | | | | | | | | | | | Summary: Some valid pre-C++11 constructs change meaning when lexed in C++11 mode, e.g. #define x(_a) printf("foo"_a); (example from http://llvm.org/bugs/show_bug.cgi?id=16342). "foo"_a is treated as a user-defined string literal when parsed in C++11 mode. In order to deal with this correctly, we need to set lexing mode according to which standard the code conforms to. We already have a configuration value for this (FormatStyle.Standard), which seems to be appropriate to use in this case as well. Reviewers: klimek CC: cfe-commits, gribozavr Differential Revision: http://llvm-reviews.chandlerc.com/D1028 llvm-svn: 185149
* Don't use PathV1.h in CIndexCodeCompletion.cpp.Rafael Espindola2013-06-261-3/+3
| | | | llvm-svn: 184940
* Remove dead include.Rafael Espindola2013-06-261-1/+0
| | | | llvm-svn: 184939
* Don't use PathV1.h in cc1as_main.cpp.Rafael Espindola2013-06-261-2/+2
| | | | llvm-svn: 184938
* Remove unused header.Rafael Espindola2013-06-261-1/+0
| | | | llvm-svn: 184937
* Use llvm::sys::fs::getMainExecutable.Rafael Espindola2013-06-262-9/+8
| | | | llvm-svn: 184915
* Reorder builds based by ordering.Eric Christopher2013-06-251-4/+4
| | | | llvm-svn: 184794
* [AST] Introduce a new DecayedType sugar nodeReid Kleckner2013-06-242-0/+12
| | | | | | | | | | | | | | The goal of this sugar node is to be able to look at an arbitrary FunctionType and tell if any of the parameters were decayed from an array or function type. Ultimately this is necessary to implement Microsoft's C++ name mangling scheme, which mangles decayed arrays differently from normal pointers. Reviewers: rsmith Differential Revision: http://llvm-reviews.chandlerc.com/D1014 llvm-svn: 184763
* Add some invalid-decl checks to clang_Type_getOffsetOf.Matt Beaumont-Gay2013-06-241-1/+3
| | | | | | | print-size-type.cpp was checking for specific record layout output for invalid decls; I've removed the checks but left the records as tests for not crashing. llvm-svn: 184751
* Comment parsing: allow "\param ..." to describe variadic argumentsDmitri Gribenko2013-06-241-16/+36
| | | | | | | | Original patch by Fariborz Jahanian; extended by me. Fixes rdar://14124644 llvm-svn: 184688
* Comment parsing: followup to r184610: allow multiple \returnsDmitri Gribenko2013-06-221-2/+2
| | | | | | | | | Remove unneeded member in CommentSema, add a test for the XML schema (the schema already allowed multiple paragraphs in <ResultDiscussion>, but there were no tests for that), fix HTML generation (it is not allowed to have <p> inside <dl>). llvm-svn: 184652
* [document parsing]: Allow multiple adjacent \return and the likeFariborz Jahanian2013-06-211-8/+13
| | | | | | | commands. Render them properly in XML output. // rdar://14207725 llvm-svn: 184610
* Update to pass in pointers intead of references.Bill Wendling2013-06-181-1/+1
| | | | llvm-svn: 184176
* Simplify a loop in ProcessCodeCompleteResults(). Pointed out by David BlaikieDmitri Gribenko2013-06-181-6/+6
| | | | llvm-svn: 184169
* ArrayRef'ize CodeCompletionContext::getNumSelIdents()Dmitri Gribenko2013-06-181-8/+6
| | | | llvm-svn: 184168
* Include PathV1.h only where it is used.Rafael Espindola2013-06-171-0/+1
| | | | llvm-svn: 184090
* [Driver] Refactor clang driver to use LLVM's Option libraryReid Kleckner2013-06-1412-21/+26
| | | | | | | | | | | | | | | | | | The big changes are: - Deleting Driver/(Arg|Opt)* - Rewriting includes to llvm/Option/ and re-sorting - 'using namespace llvm::opt' in clang::driver - Fixing the autoconf build by adding option everywhere As discussed in the review, this change includes using directives in header files. I'll make follow up changes to remove those in favor of name specifiers. Reviewers: espindola Differential Revision: http://llvm-reviews.chandlerc.com/D975 llvm-svn: 183989
* Don't depend on the transitive inclusion of PathV1.h.Rafael Espindola2013-06-132-0/+2
| | | | llvm-svn: 183945
* Use the sys::RemoveFileOnSignal that takes a StringRef.Rafael Espindola2013-06-131-1/+1
| | | | llvm-svn: 183944
* Use the sys::ExecuteAndWait that takes StringRefs.Rafael Espindola2013-06-131-0/+1
| | | | | | Also don't depend on Program.h including PathV1.h. llvm-svn: 183935
* Update for llvm change.Rafael Espindola2013-06-131-2/+2
| | | | llvm-svn: 183930
* libclang: Remove clang::RemapFiles, it's dead code.Benjamin Kramer2013-06-132-73/+0
| | | | llvm-svn: 183902
* libclang: Port CIndexer::getClangResourcesPath to PathV2. No functionality ↵Benjamin Kramer2013-06-132-16/+14
| | | | | | change. llvm-svn: 183901
* PR12086, PR15117Richard Smith2013-06-122-0/+2
| | | | | | | | | | | | | | | | | | | Introduce CXXStdInitializerListExpr node, representing the implicit construction of a std::initializer_list<T> object from its underlying array. The AST representation of such an expression goes from an InitListExpr with a flag set, to a CXXStdInitializerListExpr containing a MaterializeTemporaryExpr containing an InitListExpr (possibly wrapped in a CXXBindTemporaryExpr). This more detailed representation has several advantages, the most important of which is that the new MaterializeTemporaryExpr allows us to directly model lifetime extension of the underlying temporary array. Using that, this patch *drastically* simplifies the IR generation of this construct, provides IR generation support for nested global initializer_list objects, fixes several bugs where the destructors for the underlying array would accidentally not get invoked, and provides constant expression evaluation support for std::initializer_list objects. llvm-svn: 183872
* Use the global functions instead of the Program methods.Rafael Espindola2013-06-121-1/+1
| | | | llvm-svn: 183861
* Include PathV1.h in files that use it.Rafael Espindola2013-06-111-0/+1
| | | | | | This is preparation for replacing Path.h with PathV2.h. llvm-svn: 183781
* Make it possible to assign clang-format-buffer to a keybinding.Manuel Klimek2013-06-111-0/+1
| | | | | | Patch by Chris Gray. llvm-svn: 183739
* [clang-format] Don't flash an ugly cmd prompt in Vim on WindowsReid Kleckner2013-06-101-1/+9
| | | | | | | | Reviewers: klimek Differential Revision: http://llvm-reviews.chandlerc.com/D941 llvm-svn: 183654
* [libclang] CMake: add an option to control building libclang as a static ↵Argyrios Kyrtzidis2013-06-061-1/+4
| | | | | | | | library (off by default) This avoids building libclang twice by default. llvm-svn: 183437
* clang-check: add missing space in MakefileHans Wennborg2013-06-061-1/+1
| | | | llvm-svn: 183406
* clang-check: Link the static analyzer in the Makefile build too.Benjamin Kramer2013-06-061-3/+4
| | | | llvm-svn: 183404
* Add support for static analysis to clang-checkPavel Labath2013-06-062-8/+37
| | | | | | | | | | | | | | Summary: This adds a command line argument '-analyze' to clang-check which runs the clang static analyzer on the source files. Reviewers: klimek CC: cfe-commits, revane Differential Revision: http://llvm-reviews.chandlerc.com/D926 llvm-svn: 183399
* clang-check: Enable specification of additional compiler argumentsPavel Labath2013-06-051-0/+40
| | | | | | | | | | | | | | Summary: This adds two command-line parameters: -extra-arg and -extra-arg-before, which enable the user to pass additional parameters to the compiler command. Reviewers: klimek CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D919 llvm-svn: 183320
* [libclang] When annotating tokens, don't override a property annotation with ↵Argyrios Kyrtzidis2013-06-041-0/+5
| | | | | | | | a getter/setter method annotation. rdar://13764549 llvm-svn: 183242
* [analyzer] Add --override-compiler option to scan-build.Anna Zaks2013-05-311-0/+19
| | | | | | | The new advanced option ensures ccc-analyze is used even when better interposition methods are available. llvm-svn: 182981
* Fix default value of clang-format-diff's -p option.Daniel Jasper2013-05-301-1/+1
| | | | | | | This way, it has the same default as 'patch' and also the example in the code makes more sense as it is explicitly setting -p 1. llvm-svn: 182923
* [libclang] When indexing a @synthesize, don't consider that it defines a ↵Argyrios Kyrtzidis2013-05-291-2/+13
| | | | | | | | getter/setter if one is already defined by the user. Fixes rdar://13925258 llvm-svn: 182895
* Turn CLANG_ENABLE_{ARCMT,REWRITER,STATIC_ANALYZER} into proper options so thatRoman Divacky2013-05-291-6/+21
| | | | | | users can disable those. Just like in autoconf generated makefiles. llvm-svn: 182881
* Fix linkage computation for derived types in inline functions.Rafael Espindola2013-05-252-1/+3
| | | | | | | | | | | | | | | | | John noticed that the fix for pr15930 (r181981) didn't handle indirect uses of local types. For example, a pointer to local struct, or a function that returns it. One way to implement this would be to recursively look for local types. This would look a lot like the linkage computation itself for types. To avoid code duplication and utilize the existing linkage cache, this patch just makes the computation of "type with no linkage but externally visible because it is from an inline function" part of the linkage computation itself. llvm-svn: 182711
* [libclang] Add logging for clang_createTranslationUnit.Argyrios Kyrtzidis2013-05-241-1/+5
| | | | llvm-svn: 182682
* clang-format integration for git.Daniel Jasper2013-05-231-0/+513
| | | | | | | | | | Put this somewhere on your path and use: git clang-format Awesome work by Mark Lodato. Many thanks! llvm-svn: 182596
* scan-build: use the xcodebuild specified by the user.Jordan Rose2013-05-221-9/+4
| | | | | | | | | | This is important if the user has multiple Xcodes installed on their system -- we use xcodebuild to do a version check, and therefore we need to make sure we match the actual build command. Reported by Howard Ling! llvm-svn: 182498
* Fix off-by-one error in clang-format's emacs integration.Daniel Jasper2013-05-211-2/+2
| | | | llvm-svn: 182395
* Fix behavior of clang-format's -cursor flag.Daniel Jasper2013-05-211-1/+1
| | | | llvm-svn: 182386
* Let clang-format move the cursor appropriately.Daniel Jasper2013-05-213-13/+35
| | | | | | | | | With this patch, clang-format will try to keep the cursor at the original code position in editor integrations (implemented for emacs and vim). This means, after formatting, clang-format will try to keep the cursor on the same character of the same token. llvm-svn: 182373
* Clang-format: allow -style="{yaml/json}" on command lineAlexander Kornienko2013-05-191-8/+30
| | | | | | | | | | | | | | Summary: + improved handling of default style and predefined styles. Reviewers: djasper, klimek Reviewed By: klimek CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D813 llvm-svn: 182205
* libclang: add a function to check whether a member function is pure virtualDmitri Gribenko2013-05-173-1/+17
| | | | | | Patch by Seth Fowler. llvm-svn: 182139
* Add basic clang-format integration for sublime text.Daniel Jasper2013-05-161-0/+55
| | | | llvm-svn: 182015
* First pass of semantic analysis for init-captures: check the initializer, buildRichard Smith2013-05-162-3/+6
| | | | | | | | | | | | | a FieldDecl from it, and propagate both into the closure type and the LambdaExpr. You can't do much useful with them yet -- you can't use them within the body of the lambda, because we don't have a representation for "the this of the lambda, not the this of the enclosing context". We also don't have support or a representation for a nested capture of an init-capture yet, which was intended to work despite not being allowed by the current standard wording. llvm-svn: 181985
* Provide operator<< for stream output of DeclarationNamesDavid Blaikie2013-05-141-3/+2
| | | | | | | | | | | ASTDumper was already trying to do this & instead got an implicit bool conversion by surprise (thus printing out 0 or 1 instead of the name of the declaration). To avoid that issue & simplify call sites, simply make it the normal/expected operator<<(raw_ostream&, ...) overload & simplify all the existing call sites. (bonus: this function doesn't need to be a member or friend, it's just using public API in DeclarationName) llvm-svn: 181832
OpenPOWER on IntegriCloud