Bill Wendling
84ad5129a2
Add an explicit -object_path_lto flag during linking with a uniquified temporary
...
file name if building Apple-style.
llvm-svn: 165184
2012-10-03 23:49:57 +00:00
Bill Wendling
a1ec84474b
Remove the directory that these are already in.
...
llvm-svn: 165162
2012-10-03 21:08:21 +00:00
Argyrios Kyrtzidis
f484b139db
[libclang] When indexing, invoke the importedASTFile for PCH files as well.
...
llvm-svn: 165161
2012-10-03 21:05:51 +00:00
Argyrios Kyrtzidis
184b14428e
[libclang] Simplify indexing of module imports by handling implicit
...
imports via ImportDecls.
llvm-svn: 165160
2012-10-03 21:05:44 +00:00
Benjamin Kramer
3da0563a35
clang-check: Add clangRewriteCore.a to the Makefile build to make it link again.
...
llvm-svn: 165119
2012-10-03 14:35:38 +00:00
Daniel Jasper
30abda1612
As opposed to the clang-fixit tool described on
...
http://clang.llvm.org/docs/ClangTools.html , this adds -fixit option to
clang-check. Thus, clang-check can become a general-purpose tool to run
clang capitalizing on the info stored in a compilation database.
Review: http://llvm-reviews.chandlerc.com/D51
llvm-svn: 165110
2012-10-03 13:28:43 +00:00
Dmitri Gribenko
61b1db1629
Comment to XML conversion: escape XML special chars correctly; use correct
...
regex for version tuples.
llvm-svn: 165104
2012-10-03 09:04:56 +00:00
Bill Wendling
766d4d22ac
The top-level clang Makefile is #included into other Makefiles. (sigh) So we
...
can't have the logic here to add in the 'tools/{driver,libclang}' directories,
because they will be added in for ALL Makefiles which #include the top-level
one. Place the logic into the 'tools' Makefile.
llvm-svn: 165103
2012-10-03 08:39:19 +00:00
Argyrios Kyrtzidis
e514b200aa
Some renames to use the 'visitor' nomenclature, no functionality change.
...
llvm-svn: 165083
2012-10-03 01:58:28 +00:00
Fariborz Jahanian
e61fc44c3d
[Doc parse]: SUpport for message in deprecated/unavailable
...
attribute going iinto XML document.
llvm-svn: 165066
2012-10-02 23:01:04 +00:00
Argyrios Kyrtzidis
10e7846abf
[libclang] When indexing an AST file, only deserialize the file level
...
declarations of the current primary module.
llvm-svn: 165046
2012-10-02 21:09:13 +00:00
Fariborz Jahanian
de0ae1e406
[Doc parsing]: Add available and deprecated attribute info
...
to XML output. // rdar://12378879
llvm-svn: 165039
2012-10-02 20:05:47 +00:00
Argyrios Kyrtzidis
d4fcf58070
[libclang] When indexing an AST file, only deserialize the preprocessing record
...
entities of the current primary module.
llvm-svn: 165023
2012-10-02 16:10:51 +00:00
Argyrios Kyrtzidis
f590e094ad
Add info in the preprocessing record whether an inclusion directive
...
resulted in an automatic module import.
llvm-svn: 165022
2012-10-02 16:10:46 +00:00
Argyrios Kyrtzidis
b36ee5c592
[libclang] Even though we disable the preprocessing record during indexing,
...
make sure that it gets enabled for when a module needs to be created.
llvm-svn: 165021
2012-10-02 16:10:41 +00:00
Argyrios Kyrtzidis
472eda06b0
[libclang] Implement the importedASTFile indexing callback to provide
...
info about imported modules.
llvm-svn: 165020
2012-10-02 16:10:38 +00:00
Fariborz Jahanian
c491c3f27a
availability in structured documents. Takes
...
care of comments by Dimitri and Doug.
llvm-svn: 164957
2012-10-01 18:42:25 +00:00
Bill Wendling
446fb68894
Remove this hack in favor of another, better way of performing the same thing.
...
llvm-svn: 164915
2012-09-30 11:22:45 +00:00
Dmitri Gribenko
6743e04699
Move the 'find macro by spelling' infrastructure to the Preprocessor class and
...
use it to suggest appropriate macro for __attribute__((deprecated)) in
-Wdocumentation-deprecated-sync.
llvm-svn: 164892
2012-09-29 11:40:46 +00:00
Argyrios Kyrtzidis
19d78b743f
For PPCallbacks::InclusionDirective() add a parameter for the module, whenever
...
an inclusion directive was automatically turned into a module import, and
PPCallbacks::moduleImport() for an explicit module import.
llvm-svn: 164874
2012-09-29 01:06:10 +00:00
Fariborz Jahanian
35760a8937
[Doc parsing] Add availability information to generated Comment XML.
...
(I still need to add a test once I figure it out).
Reviewed off-line by Doug. // rdar://12378879
llvm-svn: 164861
2012-09-28 22:35:49 +00:00
Argyrios Kyrtzidis
4fcd2885de
Per discussion in http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20120917/064551.html
...
have PPCallbacks::InclusionDirective pass the character range for the filename quotes or brackets.
rdar://11113134 & http://llvm.org/PR13880
llvm-svn: 164743
2012-09-27 01:42:07 +00:00
Bill Wendling
3af41e6c5f
Use a variable to stop us from building clang testing tools.
...
<rdar://problem/11202465>
llvm-svn: 164739
2012-09-27 00:11:09 +00:00
Ted Kremenek
f81b0e387a
Have set-xcode-analyer report an error if no xcspec file could be found.
...
llvm-svn: 164713
2012-09-26 18:19:55 +00:00
Ted Kremenek
66dfa34404
Make set-xcode-analyzer more tolerant of the naming differenes reported by xcode-select.
...
llvm-svn: 164712
2012-09-26 18:13:03 +00:00
Argyrios Kyrtzidis
9ae3956f22
[libclang] Remove the ParentKind cursor kind from code-completion results.
...
This is to reduce dependency to cursors for the code-completion results.
llvm-svn: 164705
2012-09-26 16:39:56 +00:00
Argyrios Kyrtzidis
39a76387e0
Have ASTUnit::Save() return a bool to indicate save error.
...
Removes a dependency of ASTUnit to clang-c/Index.h.
llvm-svn: 164704
2012-09-26 16:39:46 +00:00
Eli Friedman
b826a00857
Fix the AST representation for non-type template arguments to encode
...
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>.
llvm-svn: 164656
2012-09-26 02:36:12 +00:00
Argyrios Kyrtzidis
341de09dcd
[libclang] Do a AST concurrency check in clang_indexTranslationUnit_Impl.
...
llvm-svn: 164626
2012-09-25 19:29:50 +00:00
Benjamin Kramer
75e4bb1d87
ccc-analyzer: pass -stdlib=libc++ through to the analyzer.
...
Otherwise clang can't analyze code that relies on features provided by libc++.
llvm-svn: 164262
2012-09-19 22:56:24 +00:00
Roman Divacky
5bebfb7363
Follow up on llvm r164132.
...
llvm-svn: 164133
2012-09-18 16:09:16 +00:00
Dmitri Gribenko
a664e5b88f
Use LLVM_DELETED_FUNCTION in place of 'DO NOT IMPLEMENT' comments.
...
llvm-svn: 163983
2012-09-15 20:20:27 +00:00
Ted Kremenek
b184a36aad
Revert "Utilize new build system support in Xcode 4.5 for easier interposition"
...
It's not clear if this is working yet on the buildbot. Reverting until we have
time to investigate.
llvm-svn: 163963
2012-09-15 05:51:10 +00:00
Ted Kremenek
460602e252
Utilize new build system support in Xcode 4.5 for easier interposition
...
of a build without needing to use ccc-analyzer.
llvm-svn: 163927
2012-09-14 19:06:33 +00:00
Jordan Rose
c87e690372
scan-build: Determine the location of the clang binary before printing help.
...
We need the clang executable to print the list of available checkers.
llvm-svn: 163925
2012-09-14 18:59:03 +00:00
Richard Smith
b15fe3a5e4
PR13811: Add a FunctionParmPackExpr node to handle references to function
...
parameter packs where the reference is not being expanded but the pack has
been. Previously, Clang would segfault in such cases.
llvm-svn: 163672
2012-09-12 00:56:43 +00:00
Chandler Carruth
482942ed08
Just revert r163605 for now. It broke the build and had some
...
questionable elements to the patch.
llvm-svn: 163609
2012-09-11 10:40:21 +00:00
David Chisnall
d81825aed7
Select the correct, or, failing that, compatible, dialect when invoked as cc,
...
c89, c99, and so on. No change to the default dialect when invoked as clang /
clang++.
llvm-svn: 163605
2012-09-11 09:58:54 +00:00
Argyrios Kyrtzidis
68e87e1360
[libclang] Do index 'extern' declarations inside functions.
...
rdar://12257073
llvm-svn: 163563
2012-09-10 22:58:04 +00:00
Dmitri Gribenko
7acbf00f96
Comment AST: TableGen'ize all command lists in CommentCommandTraits.cpp.
...
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.
llvm-svn: 163540
2012-09-10 20:32:42 +00:00
Alexander Kornienko
02f481c42f
Workaround for MacOSX build failure with gcc <= 4.4
...
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
llvm-svn: 163513
2012-09-10 14:54:38 +00:00
Alexander Kornienko
767cd03bbe
Fixed http://llvm.org/bugs/show_bug.cgi?id=13777
...
llvm-svn: 163429
2012-09-07 22:44:34 +00:00
Joao Matos
566359c0bf
Revert r163083 per chandlerc's request.
...
llvm-svn: 163149
2012-09-04 17:49:35 +00:00
Joao Matos
f8c8bfc1fc
Revert r163099 per chandlerc's request.
...
llvm-svn: 163147
2012-09-04 17:33:09 +00:00
Joao Matos
102f85655f
Added a new cursor for SEHLeaveStmt to libclang.
...
llvm-svn: 163099
2012-09-03 00:23:40 +00:00
Joao Matos
c32a7e4d8e
Implemented parsing and AST support for the MS __leave exception statement. Also a minor fix to __except printing in StmtPrinter.cpp. Thanks to Aaron Ballman for review.
...
llvm-svn: 163083
2012-09-02 03:45:41 +00:00
Argyrios Kyrtzidis
b0b336ebe9
[libclang] Fix indexing type alias declarations. rdar://11878406
...
llvm-svn: 163072
2012-09-01 19:08:08 +00:00
Argyrios Kyrtzidis
da188de2b6
[libclang] The annotation of tokens operation visits statement nodes 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.
llvm-svn: 163071
2012-09-01 18:27:30 +00:00
Ted Kremenek
2ce4a8ff63
Comment that clang.dll is unavailable on cygming yet.
...
llvm-svn: 163055
2012-09-01 07:38:58 +00:00
NAKAMURA Takumi
f7e150cc41
c-arcmt-test/Makefile: Restore some stuff. clang.dll is unavailable on cygming yet.
...
llvm-svn: 163054
2012-09-01 06:38:53 +00:00