aboutsummaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)Author
2013-05-08Merging r181299:Bill Wendling
------------------------------------------------------------------------ r181299 | djasper | 2013-05-07 02:25:29 -0700 (Tue, 07 May 2013) | 5 lines Fix clang-format emacs integration in last line. Emacs seems to have a line that is just past the last character of the buffers content. This needs to be handled specially so that clang-format is not called with an invalid -offset. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_33@181380 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-06Have the RecursiveASTVisitor traverse the type source info of an objc class ↵Argyrios Kyrtzidis
message. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181237 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-06Added Mozilla style, cleaned get*Style methods.Alexander Kornienko
Summary: Patch based on a patch by Ehsan Akhgari. Reviewers: djasper Reviewed By: djasper CC: cfe-commits, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D750 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181196 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-03Remove DiagnosticConsumer::clone(), a bad idea that is now unused.Douglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181070 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-03[Preprocessor] For the MacroExpands preprocessor callback, also pass the ↵Argyrios Kyrtzidis
MacroArgs object that provides information about the argument tokens for a function macro. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181065 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-02Remove redundant flag.Bill Wendling
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180968 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-02We don't want FP elimination when doing an Apple-style build.Bill Wendling
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180950 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-02Basic clang-format integration for BBEdit.Daniel Jasper
Thanks to Avi Drissman! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180933 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-02[analyzer] Finally make c++-analyzer 'executable' again.Anton Yartsev
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180905 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-02[analyzer] Recreated as a file.Anton Yartsev
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180903 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-02[analyzer] Temporary remove c++analyzer to recreate it as a separate file, ↵Anton Yartsev
not a symlink. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180902 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-02[analyzer] scan-build for WindowsAnton Yartsev
The patch allows Windows users to launch scan-build without any additional preparations in the same way as it described in http://clang-analyzer.llvm.org/scan-build.html. The only thing that should be done to make scan-build work from an arbitrary location is to add scan-build folder to the PATH environment variable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180900 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-30[analyzer] scan-build: support -enable-checker with new Xcode integration.Jordan Rose
<rdar://problem/13772094> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180812 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-29[analyzer] scan-view: don't ever serve absolute paths.Jordan Rose
At one point in time scan-view allowed absolute paths to reference files within the server root, but this doesn't seem to be used anymore, and caused problems if a server-root-relative path actually matched an absolute path to an existing file. This patch just treats paths as server-root-relative all the time. PR15843 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180715 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-26[libclang] Introduce clang_Module_getASTFile function that returns the ↵Argyrios Kyrtzidis
module file where a module object came from. rdar://13743084 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180643 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-26[PCH/modules] Require the preprocessing record option to match the used PCH, ↵Argyrios Kyrtzidis
if modules are enabled. The preprocessing record becomes important when modules are enabled, since it is used to calculate the module cache hash. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180635 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-25Fix scrolling bug in clang-format's emacs integration.Daniel Jasper
This patch ensure that nothing scrolls even if the same buffer is opened in multiple windows. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180252 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-24clang-format support for multiple input files.Alexander Kornienko
Summary: Added support for multiple input files, that can be used both with and without in-place edit (-i) option. Added checks for -offset and -length options: don't allow them on multiple files, check that they don't fall outside input file, made both options unsigned, so that there's no need to check for negative values. Removed "-1 can be used for end-of-file" from -length description. Reviewers: djasper, klimek Reviewed By: djasper CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D719 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180185 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-24Fix typo in comparison in clang_CXCursorSet_contains().Ted Kremenek
Fixes PR 10124. Patch by Jens Kilian. Thanks to Nikola Smiljanic for following up. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180177 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-24Revert "Remove CXCursorSet and related APIs. There are no known clients."Ted Kremenek
Apparently there are... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180176 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-24Remove CXCursorSet and related APIs. There are no known clients.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180174 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-23[libclang] Introduce a CXCursor_ObjCSelfExpr cursor, which is the equivalent ↵Argyrios Kyrtzidis
of CXCursor_CXXThisExpr for C++ code. rdar://13717006 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180127 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-23[scan-build] Whitelist all -mXXXX options.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180073 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-20C++1y: Allow aggregates to have default initializers.Richard Smith
Add a CXXDefaultInitExpr, analogous to CXXDefaultArgExpr, and use it both in CXXCtorInitializers and in InitListExprs to represent a default initializer. There's an additional complication here: because the default initializer can refer to the initialized object via its 'this' pointer, we need to make sure that 'this' points to the right thing within the evaluation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179958 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-18[libclang] Introduce clang_Cursor_isVariadic, which returns non-zero if the ↵Argyrios Kyrtzidis
given cursor is a variadic function or method. rdar://13667150 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179819 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-18[libclang] Introduce clang_Cursor_getObjCDeclQualifiers, to query for 'ObjC ↵Argyrios Kyrtzidis
Qualifiers' written next to the return and parameter types in an ObjC method declarations. rdar://13676977 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179816 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-18[libclang] Introduce clang_Cursor_getObjCPropertyAttributes to query the ↵Argyrios Kyrtzidis
written attributes in a property declaration. rdar://13684512 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179803 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-18[libclang] Report parameter array types as written in source, not decayed to ↵Argyrios Kyrtzidis
pointer types. Patch by Doug. rdar://13684618 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179769 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-17Small improvements to clang-format documentation and integrationDaniel Jasper
scripts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179676 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-16Sema for Captured StatementsTareq A. Siraj
Add CapturedDecl to be the DeclContext for CapturedStmt, and perform semantic analysis. Currently captures all variables by reference. TODO: templates Author: Ben Langmuir <ben.langmuir@intel.com> Differential Revision: http://llvm-reviews.chandlerc.com/D433 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179618 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-16Implement CapturedStmt ASTTareq A. Siraj
CapturedStmt can be used to implement generic function outlining as described in http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-January/027540.html. CapturedStmt is not exposed to the C api. Serialization and template support are pending. Author: Wei Pan <wei.pan@intel.com> Differential Revision: http://llvm-reviews.chandlerc.com/D370 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179615 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-16Basic support for Microsoft property declarations andJohn McCall
references thereto. Patch by Tong Shen! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179585 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-12[libclang] Introduce clang_Location_isInSystemHeader to check if a location ↵Argyrios Kyrtzidis
resides in a system header. This is a modified patch provided from Mikołaj Siedlarek! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179384 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-12Fix clang-format-diff.py script.Daniel Jasper
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179377 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-12Provide better emacs integration.Daniel Jasper
The new emacs integration is simpler, does not save the current file before reformatting and ensures that emacs does not scroll as a result of formatting. Also explicitly set the style in clang-format tests to make them more robust. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179372 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-11[libclang] Have clang_getCXXAccessSpecifier() also return the access control ↵Argyrios Kyrtzidis
of a C++ declaration within its parent scope. Suggested by Stefan Seefeld. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179297 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-11[libclang] Expose record layout info via new libclang functions:Argyrios Kyrtzidis
clang_Type_getAlignOf clang_Type_getSizeOf clang_Type_getOffsetOf clang_Cursor_isBitField Patch by Loïc Jaquemet! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179251 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-09[c-index-test] Enable 'display diagnostics' when using the -test-load ↵Argyrios Kyrtzidis
functionality. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179123 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-09[libclang] In cxtu::getASTUnit(), check for a null CXTranslationUnit.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179121 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-09Improvements to clang-format integrations.Daniel Jasper
This adds an emacs editor integration (thanks to Ami Fischman). Also pulls out the style into a variable for the vi integration and just uses clang-formats defaults style in clang-format-diff.py. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179098 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-08Remove outdated part of help message.Daniel Jasper
The styles are now documented with the -style option. This fixes llvm.org/PR15689. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179017 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-05[libclang] Fix cursor visitation to not ignore template arguments in ↵Argyrios Kyrtzidis
out-of-line member functions. rdar://13535645 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178911 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-04[libclang] Add some checks to make sure the given CXTranslationUnit is not ↵Argyrios Kyrtzidis
null, before using it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178800 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-04cmake: mark clang as needing exported symbol.Rafael Espindola
This is a nop right now, but committing this first avoids a temporary breakage when the llvm files change to not default to exporting symbols. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178723 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-01[libclang] Make clang_Cursor_getArgument work with call-exprs.Argyrios Kyrtzidis
Patch by Matthias Kleine! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178475 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-29[libclang] If libclang logging is enabled, print all compiler diagnostics to ↵Argyrios Kyrtzidis
stderr instead of capturing them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178373 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-29[cmake] Add clang-headers as a dependency of libclang and if we have to copy ↵Argyrios Kyrtzidis
them for the IDE case, also create a symlink inside the libclang.dylib directory. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178372 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-27Update the error handing static functions for r178161.Chad Rosier
Part of rdar://13296693 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178162 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-26Remove a FIXME that's not planned to be fixed. We only generated crashChad Rosier
diagnostics for the first failing command. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178086 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-26[Preprocessor/Modules] Separate the macro directives kinds into their own ↵Argyrios Kyrtzidis
MacroDirective's subclasses. For each macro directive (define, undefine, visibility) have a separate object that gets chained to the macro directive history. This has several benefits: -No need to mutate a MacroDirective when there is a undefine/visibility directive. Stuff like PPMutationListener become unnecessary. -No need to keep extra source locations for the undef/visibility locations for the define directive object (which is the majority of the directives) -Much easier to hide/unhide a section in the macro directive history. -Easier to track the effects of the directives across different submodules. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178037 91177308-0d34-0410-b5e6-96231b3b80d8