Argyrios Kyrtzidis
d0e58e9be8
[libclang] For a reference of an implicit template instantiation just give
...
a reference for the instantiation decl. Also test that its location is correct
after previous commit.
llvm-svn: 150291
2012-02-11 02:00:00 +00:00
Jim Grosbach
576452b830
Have the driver pass CPU and target feature information to cc1as.
...
When creating the MCSubtargetInfo, the assembler driver uses the CPU and
feature string to construct a more accurate model of what instructions
are and are not legal.
rdar://10840476
llvm-svn: 150273
2012-02-10 20:37:10 +00:00
Argyrios Kyrtzidis
4701cf61d7
[libclang] Indexing API: fully index using decls and directives.
...
llvm-svn: 150268
2012-02-10 20:10:48 +00:00
Argyrios Kyrtzidis
e5dc5b31f2
[libclang] Indexing API: Fully index implict template instantiations.
...
llvm-svn: 150267
2012-02-10 20:10:44 +00:00
Argyrios Kyrtzidis
1b6e5dc6a5
[libclang] Encode the template specialization parameters of a function
...
specialization in its USR string.
llvm-svn: 150264
2012-02-10 20:10:32 +00:00
Dylan Noblesmith
9345813ddd
cmake: create a relative symlink to clang, not absolute
...
Hardcoding the location of the build directory seems like it would
break at `make install`/packaging time.
llvm-svn: 150201
2012-02-09 20:02:46 +00:00
Argyrios Kyrtzidis
95c0feb5e0
[libclang] Indexing: When suppressing references, suppress references
...
of bases in C++ classes. rdar://10768707
llvm-svn: 150048
2012-02-08 03:04:33 +00:00
Argyrios Kyrtzidis
a2a299e586
[libclang] For CXXOperatorCallExprs, give a valid source location to the DeclRefExpr
...
that is referencing the member function, so we can index the referenced function.
Fixes rdar://10762375&10324915 & http://llvm.org/PR11192
llvm-svn: 150033
2012-02-08 01:21:13 +00:00
Argyrios Kyrtzidis
ea9b81b4c6
[libclang] Do not index implicit C++ member functions. rdar://10769813
...
llvm-svn: 150007
2012-02-07 22:46:16 +00:00
Benjamin Kramer
7ec12c928a
Revert my patches which removed Diagnostic.h includes by moving some operator overloads out of line.
...
This seems to negatively affect compile time onsome ObjC tests
(which use a lot of partial diagnostics I assume). I have to come
up with a way to keep them inline without including Diagnostic.h
everywhere. Now adding a new diagnostic requires a full rebuild
of e.g. the static analyzer which doesn't even use those diagnostics.
This reverts commit 6496bd10dc3a6d5e3266348f08b6e35f8184bc99.
This reverts commit 7af19b817ba964ac560b50c1ed6183235f699789.
This reverts commit fdd15602a42bbe26185978ef1e17019f6d969aa7.
This reverts commit 00bd44d5677783527d7517c1ffe45e4d75a0f56f.
This reverts commit ef9b60ffed980864a8db26ad30344be429e58ff5.
llvm-svn: 150006
2012-02-07 22:29:24 +00:00
David Blaikie
09d20eefaa
Make use of const-correct ParseCommandLineOptions
...
llvm-svn: 150000
2012-02-07 19:36:38 +00:00
Benjamin Kramer
db0fc5131d
Print NamedDecls directly to a raw_ostream where possible.
...
llvm-svn: 149982
2012-02-07 11:57:57 +00:00
Douglas Gregor
e31e606ff3
Introduce basic ASTs for lambda expressions. This covers:
...
- Capturing variables by-reference and by-copy within a lambda
- The representation of lambda captures
- The creation of the non-static data members in the lambda class
that store the captured variables
- The initialization of the non-static data members from the
captured variables
- Pretty-printing lambda expressions
There are a number of FIXMEs, both explicit and implied, including:
- Creating a field for a capture of 'this'
- Improved diagnostics for initialization failures when capturing
variables by copy
- Dealing with temporaries created during said initialization
- Template instantiation
- AST (de-)serialization
- Binding and returning the lambda expression; turning it into a
proper temporary
- Lots and lots of semantic constraints
- Parameter pack captures
llvm-svn: 149977
2012-02-07 10:09:13 +00:00
Abramo Bagnara
48c05be124
Added location for template keyword in TemplateSpecializationTypeLoc. In the process removed some naming ambiguities.
...
llvm-svn: 149870
2012-02-06 14:41:24 +00:00
Benjamin Kramer
3307c508c9
Move various diagnostic operator<< overloads out of line and remove includes of Diagnostic.h.
...
Fix all the files that depended on transitive includes of Diagnostic.h.
With this patch in place changing a diagnostic no longer requires a full rebuild of the StaticAnalyzer.
llvm-svn: 149781
2012-02-04 12:31:12 +00:00
Argyrios Kyrtzidis
fcf8d1f82a
[libclang] Stick to the silly notion that a forward class/protocol
...
declaration is a reference. rdar://10749990
llvm-svn: 149733
2012-02-04 01:04:58 +00:00
Jim Grosbach
ff3789a6bb
Pass the SourceMgr to the MCContext for cc1as.
...
llvm-svn: 149608
2012-02-02 17:54:07 +00:00
Abramo Bagnara
7945c981b9
Added source location for the template keyword in AST template-id expressions.
...
llvm-svn: 149127
2012-01-27 09:46:47 +00:00
Ted Kremenek
49db052db4
Teach ccc-analyzer about -fobjc-abi-version.
...
llvm-svn: 149094
2012-01-26 23:30:13 +00:00
Fariborz Jahanian
48fd81b484
objc-arc: introduce -no-finalize-removal which in gc mode,
...
leaves "finalize' behind and in arc mode, does not
include it. This allows the migrated source to be compiled
in both gc and arc mode. // rdar://10532441
llvm-svn: 149079
2012-01-26 20:57:58 +00:00
Argyrios Kyrtzidis
be6d89d255
[driver] Do emit the diagnostics when CompilerInvocation::CreateFromArgs() fails.
...
llvm-svn: 148970
2012-01-25 20:00:43 +00:00
Anna Zaks
b3d896d333
[analyzer] Add the HTML file to the SATest diagnostic diff.
...
(Uses the functionality which has been in CmpRuns long before.)
llvm-svn: 148868
2012-01-24 21:57:35 +00:00
Argyrios Kyrtzidis
3698cef19f
[libclang] In clang::getCursorKindForDecl() don't return "UnexposedDecl"
...
for forward references of classes and protocols, this breaks libclang API usage.
rdar://10747438.
llvm-svn: 148861
2012-01-24 21:39:26 +00:00
Argyrios Kyrtzidis
d0a27f717e
[libclang] When calling clang_getCursorReferenced on a class or protocol
...
forward reference, do give an interface or protocol cursor back, don't give
an 'UnexposedDecl' one.
rdar://10743193
llvm-svn: 148848
2012-01-24 19:40:15 +00:00
Argyrios Kyrtzidis
18dc04eba2
[libclang] For:
...
@implementation I(cat)
suppress subsequent references to 'I'.
rdar://10568103
llvm-svn: 148730
2012-01-23 21:28:38 +00:00
Argyrios Kyrtzidis
5c4e065a9a
Introduce CXXRecordDecl::isCLike() that is true if the class is C-like,
...
without C++-specific features.
Use it to set the language to C++ when indexing non-C-like structs.
rdar://10732579
llvm-svn: 148708
2012-01-23 16:58:45 +00:00
Argyrios Kyrtzidis
7e614d7dce
[libclang] Index C++ template specializations, rdar://10732708
...
llvm-svn: 148707
2012-01-23 16:58:41 +00:00
Argyrios Kyrtzidis
9f777356a3
[libclang] Index namespaces in C++ qualified lookup of members, rdar://10732798
...
llvm-svn: 148706
2012-01-23 16:58:38 +00:00
Argyrios Kyrtzidis
84bd164862
[libclang] Index C++ constructor initializers, rdar://10732164
...
llvm-svn: 148705
2012-01-23 16:58:36 +00:00
Sebastian Pop
422377cfd3
rename -ccc-host-triple into -target
...
llvm-svn: 148582
2012-01-20 22:01:23 +00:00
David Blaikie
e4d798f078
More dead code removal (using -Wunreachable-code)
...
llvm-svn: 148577
2012-01-20 21:50:17 +00:00
Douglas Gregor
32fbe31246
Extract the (InputKind, std::string) pair used to describe inputs to
...
the front end into its own class, FrontendInputFile, to make it easier
to introduce new per-input data. No functionality change.
llvm-svn: 148546
2012-01-20 16:28:04 +00:00
Argyrios Kyrtzidis
908c4dcc5d
[libclang] Fix crash when indexing attributes, rdar://10702250.
...
llvm-svn: 148524
2012-01-20 01:38:51 +00:00
Argyrios Kyrtzidis
da6e05476d
[libclang] Make sure Preprocessor is set in ASTUnit during indexing.
...
llvm-svn: 148319
2012-01-17 18:48:07 +00:00
David Blaikie
8a40f700e6
Remove unreachable code in Clang. (replace with llvm_unreachable where appropriate or when GCC requires it)
...
llvm-svn: 148292
2012-01-17 06:56:22 +00:00
David Blaikie
f47fa304a4
Remove unnecessary default cases in switches over enums.
...
This allows -Wswitch-enum to find switches that need updating when these enums are modified.
llvm-svn: 148281
2012-01-17 02:30:50 +00:00
Argyrios Kyrtzidis
7890821b5b
[libclang] Make clang_getCursorCompletionString not depend on the ASTUnit having
...
a Sema.
This allows it to work when Sema is not available, like when loading AST files.
llvm-svn: 148279
2012-01-17 02:15:54 +00:00
Douglas Gregor
ec9fd13c77
De-virtualize getPreviousDecl() and getMostRecentDecl() when we know
...
we have a redeclarable type, and only use the new virtual versions
(getPreviousDeclImpl() and getMostRecentDeclImpl()) when we don't have
that type information. This keeps us from penalizing users with strict
type information (and is the moral equivalent of a "final" method).
Plus, settle on the names getPreviousDecl() and getMostRecentDecl()
throughout.
llvm-svn: 148187
2012-01-14 16:38:05 +00:00
Argyrios Kyrtzidis
9ef9486ab7
[libclang] If CXIndexOpt_IndexFunctionLocalSymbols is enabled, also
...
index parameters.
llvm-svn: 148169
2012-01-14 02:05:51 +00:00
Argyrios Kyrtzidis
fb7d1455cd
[libclang] Add CXIndexOpt_IndexFunctionLocalSymbols indexing option to indicate
...
that one wants indexing callbacks for function-local symbols as well.
llvm-svn: 148160
2012-01-14 00:11:49 +00:00
Eli Friedman
d749c6bf2e
Revert r148138; it's causing test failures.
...
llvm-svn: 148141
2012-01-13 21:33:06 +00:00
Sebastian Pop
9a8d528ddf
rename -ccc-host-triple into -target
...
llvm-svn: 148138
2012-01-13 20:37:02 +00:00
Rafael Espindola
0506cd8cfc
Revert 148045 to fix the bots.
...
llvm-svn: 148049
2012-01-12 21:17:34 +00:00
Rafael Espindola
9479c1b42a
Add a SONAME to the libclang library.
...
Patch by Sylvestre Ledru.
llvm-svn: 148045
2012-01-12 21:04:54 +00:00
Argyrios Kyrtzidis
a80f1bf262
Add IsImplicit field in ObjCMessageExpr that is true when the message
...
was constructed, e.g. for a property access.
This allows the selector identifier locations machinery for ObjCMessageExpr
to function correctly, in that there are not real locations to handle/report for
such a message.
llvm-svn: 148013
2012-01-12 02:34:39 +00:00
Anna Zaks
dc90f07b90
[analyzer] Correct the c++-analyzer symlink
...
As Matt pointed out, this should be just a link to 'ccc-analyzer'.
llvm-svn: 147661
2012-01-06 17:11:23 +00:00
Anna Zaks
06c9397665
[analyzer] c++-analyzer should be a symlink.
...
This fixes a regression from r147643.
llvm-svn: 147648
2012-01-06 02:19:07 +00:00
Anna Zaks
8e2fc5c5e9
[analyzer] Update the docs to reflect that gcc is not the only default
...
compiler option.
llvm-svn: 147645
2012-01-06 01:54:08 +00:00
Anna Zaks
1d39152059
[analyzer] scan-build: If we are on MacOS, use clang as the default
...
compiler.
llvm-svn: 147644
2012-01-06 01:54:05 +00:00
Anna Zaks
3a7f73d996
[analyzer] Skip --serialize-diagnostic when running scan-build.
...
Otherwise, the analyzer will try to analyze the serialized diagnostic
file as if it were a source file.
llvm-svn: 147643
2012-01-06 01:54:02 +00:00