Argyrios Kyrtzidis
1030f26261
[libclang] Add a null check in CursorVisitor::visitPreprocessedEntities.
...
rdar://13680583
llvm-svn: 181352
2013-05-07 20:37:17 +00:00
Daniel Jasper
ee48c856e2
Further fix to clang-format emacs integration.
...
This is just a slight improvement for the fix in r181299, which fixes
formatting the very last line of a file.
llvm-svn: 181303
2013-05-07 10:04:47 +00:00
Daniel Jasper
f7bec9b4ed
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.
llvm-svn: 181299
2013-05-07 09:25:29 +00:00
Argyrios Kyrtzidis
fe6a01253e
Have the RecursiveASTVisitor traverse the type source info of an objc class message.
...
llvm-svn: 181237
2013-05-06 19:08:57 +00:00
Alexander Kornienko
c860266e0f
Added Mozilla style, cleaned get*Style methods.
...
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
llvm-svn: 181196
2013-05-06 14:11:27 +00:00
Douglas Gregor
30071cead9
Remove DiagnosticConsumer::clone(), a bad idea that is now unused.
...
llvm-svn: 181070
2013-05-03 23:07:45 +00:00
Argyrios Kyrtzidis
37e48ff547
[Preprocessor] For the MacroExpands preprocessor callback, also pass the MacroArgs object that provides information about
...
the argument tokens for a function macro.
llvm-svn: 181065
2013-05-03 22:31:32 +00:00
Bill Wendling
952e8dfa8c
Remove redundant flag.
...
llvm-svn: 180968
2013-05-02 22:53:00 +00:00
Bill Wendling
3dfc28782f
We don't want FP elimination when doing an Apple-style build.
...
llvm-svn: 180950
2013-05-02 21:09:11 +00:00
Daniel Jasper
5f99742632
Basic clang-format integration for BBEdit.
...
Thanks to Avi Drissman!
llvm-svn: 180933
2013-05-02 17:37:36 +00:00
Anton Yartsev
604518ccd4
[analyzer] Finally make c++-analyzer 'executable' again.
...
llvm-svn: 180905
2013-05-02 01:57:58 +00:00
Anton Yartsev
10f9d08c70
[analyzer] Recreated as a file.
...
llvm-svn: 180903
2013-05-02 01:41:51 +00:00
Anton Yartsev
2320d295af
[analyzer] Temporary remove c++analyzer to recreate it as a separate file, not a symlink.
...
llvm-svn: 180902
2013-05-02 01:36:41 +00:00
Anton Yartsev
19993e8441
[analyzer] Added 'executable' property to c++analyzer.
...
llvm-svn: 180901
2013-05-02 01:18:17 +00:00
Anton Yartsev
caaaf2ee28
[analyzer] scan-build for Windows
...
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.
llvm-svn: 180900
2013-05-02 00:52:46 +00:00
Jordan Rose
38c97d2642
[analyzer] scan-build: support -enable-checker with new Xcode integration.
...
<rdar://problem/13772094>
llvm-svn: 180812
2013-04-30 22:00:04 +00:00
Jordan Rose
63524b9453
[analyzer] scan-view: don't ever serve absolute paths.
...
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
llvm-svn: 180715
2013-04-29 17:23:06 +00:00
Argyrios Kyrtzidis
12fdb9e34b
[libclang] Introduce clang_Module_getASTFile function that returns the module file where a module object came from.
...
rdar://13743084
llvm-svn: 180643
2013-04-26 22:47:49 +00:00
Argyrios Kyrtzidis
d3afa0c7fb
[PCH/modules] Require the preprocessing record option to match the used PCH, if modules are enabled.
...
The preprocessing record becomes important when modules are enabled, since it is used to calculate the
module cache hash.
llvm-svn: 180635
2013-04-26 21:33:40 +00:00
Daniel Jasper
a04337e22b
Fix scrolling bug in clang-format's emacs integration.
...
This patch ensure that nothing scrolls even if the same buffer is opened
in multiple windows.
llvm-svn: 180252
2013-04-25 07:06:48 +00:00
Alexander Kornienko
3fbee010c6
clang-format support for multiple input files.
...
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
llvm-svn: 180185
2013-04-24 12:46:44 +00:00
Ted Kremenek
29b28e8f07
Fix typo in comparison in clang_CXCursorSet_contains().
...
Fixes PR 10124.
Patch by Jens Kilian.
Thanks to Nikola Smiljanic for following up.
llvm-svn: 180177
2013-04-24 07:25:40 +00:00
Ted Kremenek
c0b98663e9
Revert "Remove CXCursorSet and related APIs. There are no known clients."
...
Apparently there are...
llvm-svn: 180176
2013-04-24 07:17:12 +00:00
Ted Kremenek
616986f859
Remove CXCursorSet and related APIs. There are no known clients.
...
llvm-svn: 180174
2013-04-24 06:52:14 +00:00
Argyrios Kyrtzidis
c2233beba4
[libclang] Introduce a CXCursor_ObjCSelfExpr cursor, which is the equivalent of CXCursor_CXXThisExpr for C++ code.
...
rdar://13717006
llvm-svn: 180127
2013-04-23 17:57:17 +00:00
Ted Kremenek
b44bc7d599
[scan-build] Whitelist all -mXXXX options.
...
llvm-svn: 180073
2013-04-23 00:10:55 +00:00
Richard Smith
852c9db72b
C++1y: Allow aggregates to have default initializers.
...
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.
llvm-svn: 179958
2013-04-20 22:23:05 +00:00
Argyrios Kyrtzidis
23814e4f49
[libclang] Introduce clang_Cursor_isVariadic, which returns non-zero if the given cursor is a variadic function or method.
...
rdar://13667150
llvm-svn: 179819
2013-04-18 23:53:05 +00:00
Argyrios Kyrtzidis
9d9bc01e42
[libclang] Introduce clang_Cursor_getObjCDeclQualifiers, to query for 'ObjC Qualifiers' written next to the return and
...
parameter types in an ObjC method declarations.
rdar://13676977
llvm-svn: 179816
2013-04-18 23:29:12 +00:00
Argyrios Kyrtzidis
9adfd8aabb
[libclang] Introduce clang_Cursor_getObjCPropertyAttributes to query the written attributes in a property declaration.
...
rdar://13684512
llvm-svn: 179803
2013-04-18 22:15:49 +00:00
Argyrios Kyrtzidis
5af4f2b7ea
[libclang] Report parameter array types as written in source, not decayed to pointer types.
...
Patch by Doug.
rdar://13684618
llvm-svn: 179769
2013-04-18 16:41:15 +00:00
Daniel Jasper
dd77743af8
Small improvements to clang-format documentation and integration
...
scripts.
llvm-svn: 179676
2013-04-17 07:55:02 +00:00
Tareq A. Siraj
6dfa25a19f
Sema for Captured Statements
...
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
llvm-svn: 179618
2013-04-16 19:37:38 +00:00
Tareq A. Siraj
24110cc733
Implement CapturedStmt AST
...
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
llvm-svn: 179615
2013-04-16 18:53:08 +00:00
John McCall
5e77d76c95
Basic support for Microsoft property declarations and
...
references thereto.
Patch by Tong Shen!
llvm-svn: 179585
2013-04-16 07:28:30 +00:00
Argyrios Kyrtzidis
25f7af1aeb
[libclang] Introduce clang_Location_isInSystemHeader to check if a location resides in a system header.
...
This is a modified patch provided from Mikołaj Siedlarek!
llvm-svn: 179384
2013-04-12 17:06:51 +00:00
Daniel Jasper
31f916ac51
Fix clang-format-diff.py script.
...
llvm-svn: 179377
2013-04-12 13:42:36 +00:00
Daniel Jasper
92a3130509
Provide better emacs integration.
...
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.
llvm-svn: 179372
2013-04-12 10:12:01 +00:00
Argyrios Kyrtzidis
1ab09cc883
[libclang] Have clang_getCXXAccessSpecifier() also return the access control of a C++ declaration within its parent scope.
...
Suggested by Stefan Seefeld.
llvm-svn: 179297
2013-04-11 17:02:10 +00:00
Argyrios Kyrtzidis
e822f58db4
[libclang] Expose record layout info via new libclang functions:
...
clang_Type_getAlignOf
clang_Type_getSizeOf
clang_Type_getOffsetOf
clang_Cursor_isBitField
Patch by Loïc Jaquemet!
llvm-svn: 179251
2013-04-11 01:20:11 +00:00
Argyrios Kyrtzidis
bcc8a5a70a
[c-index-test] Enable 'display diagnostics' when using the -test-load functionality.
...
llvm-svn: 179123
2013-04-09 20:29:24 +00:00
Argyrios Kyrtzidis
2bee666540
[libclang] In cxtu::getASTUnit(), check for a null CXTranslationUnit.
...
llvm-svn: 179121
2013-04-09 20:03:03 +00:00
Daniel Jasper
e4549a2391
Improvements to clang-format integrations.
...
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.
llvm-svn: 179098
2013-04-09 15:23:04 +00:00
Daniel Jasper
4b14f4f9e6
Remove outdated part of help message.
...
The styles are now documented with the -style option. This fixes
llvm.org/PR15689.
llvm-svn: 179017
2013-04-08 10:50:02 +00:00
Argyrios Kyrtzidis
2ec76747f4
[libclang] Fix cursor visitation to not ignore template arguments in out-of-line member functions.
...
rdar://13535645
llvm-svn: 178911
2013-04-05 21:04:10 +00:00
Argyrios Kyrtzidis
0e95fcacdf
[libclang] Add some checks to make sure the given CXTranslationUnit is not null, before using it.
...
llvm-svn: 178800
2013-04-04 22:40:59 +00:00
Rafael Espindola
5515ff804f
cmake: mark clang as needing exported symbol.
...
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.
llvm-svn: 178723
2013-04-04 00:58:40 +00:00
Argyrios Kyrtzidis
b2792972a2
[libclang] Make clang_Cursor_getArgument work with call-exprs.
...
Patch by Matthias Kleine!
llvm-svn: 178475
2013-04-01 17:38:59 +00:00
Argyrios Kyrtzidis
828f4d4b9f
[libclang] If libclang logging is enabled, print all compiler diagnostics to stderr instead of capturing them.
...
llvm-svn: 178373
2013-03-29 21:51:44 +00:00
Argyrios Kyrtzidis
41686481f4
[cmake] Add clang-headers as a dependency of libclang and if we have to copy them
...
for the IDE case, also create a symlink inside the libclang.dylib directory.
llvm-svn: 178372
2013-03-29 21:51:40 +00:00