Richard Smith
1d489cf4a0
Remove first argument from Arg::getValue; it's been unused since r105760.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167211 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-01 04:30:05 +00:00
Richard Smith
7c3f8b3daf
Remove CompilerInvocation::toArgs and clang -cc1test mode. These were untested
...
and apparently unused (and since they are untested, they're presumably also
broken).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167210 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-01 03:48:49 +00:00
Argyrios Kyrtzidis
e4a990f349
[libclang] Introduce clang_Cursor_getReceiverType which returns the CXType for
...
the receiver of an ObjC message expression.
rdar://12578643
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167201 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-01 02:01:34 +00:00
Nick Lewycky
76dd1d9169
Add missing emacs major mode marker.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166914 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-29 06:03:58 +00:00
Nick Lewycky
6cd2bf886c
Fix name of this file.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166913 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-29 06:03:40 +00:00
Nick Lewycky
eb86dcc008
Add missing emacs major mode marker.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166912 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-29 06:02:59 +00:00
Dmitri Gribenko
7c98499ba5
Comment to XML conversion: avoid memory allocation while pretty-printing the
...
declaration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166707 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-25 18:28:26 +00:00
NAKAMURA Takumi
3584972866
c-index-test.c: Split a format string. [-Woverlength-strings]
...
FIXME: They are still long strings without formatter in printf(3)!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166636 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-24 22:52:04 +00:00
Argyrios Kyrtzidis
11db182467
[libclang] Add "-index-file-full" option that recursively indexes any imported
...
modules/PCH files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166605 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-24 18:29:15 +00:00
Douglas Gregor
02c23ebf41
Make DiagnosticOptions intrusively reference-counted, and make sure
...
the various stakeholders bump up the reference count. In particular,
the diagnostics engine now keeps the DiagnosticOptions object alive.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166508 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-23 22:26:28 +00:00
Sean Silva
ab4826835f
Fix some mdoc nits
...
Patch by Eitan Adler!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166482 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-23 16:35:44 +00:00
Argyrios Kyrtzidis
28f3a0e491
[libclang] Add an environment variable to disable thread background priotity, for testing
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166466 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-23 04:09:38 +00:00
Dmitri Gribenko
8cfabf2cb2
Remove const_casts by propagating constness down to called functions.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166287 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-19 16:51:38 +00:00
Fariborz Jahanian
262e60c1cc
[doc parsing] use getParamName to access parameter
...
for current(rewritten) comment and getParamNameAsWritten
to access param name coming with \param marker.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166231 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-18 21:42:42 +00:00
NAKAMURA Takumi
922fbc41e4
libclang/CXComment.cpp: Fix abuse of StringRef.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166163 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-18 01:38:53 +00:00
Argyrios Kyrtzidis
8d7a24e94b
[libclang] Invoke a ppIncludedFile callback when indexing implicit module imports.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166161 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-18 00:17:05 +00:00
Fariborz Jahanian
1bfb00dabf
[Doc parsing]: This patch adds <Declaration> tag to
...
XML comment for declarations which pretty-prints
declaration. I had to XFAIL one test annotate-comments.cpp.
This test is currently unmaintainable as written.
Dmitri G., can you see what we can do about this test.
We should change this test such that adding a new tag does not wreck
havoc to the test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166130 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-17 21:58:03 +00:00
Derek Schuff
263366f924
Add pnaclcall convention to Native Client targets.
...
Because PNaCl bitcode must be target-independent, it uses some
different bitcode representations from other targets (e.g. byval and
sret for structures). This means that without additional type
information, it cannot meet some native ABI requirements for some
targets (e.g. passing structures containing unions by value on
x86-64). To allow generation of code which uses the correct native
ABIs, we also support triples such as x86_64-nacl, which uses
target-dependent IR (as opposed to le32-nacl, which uses byval and
sret).
To allow interoperation between the two types of code, this patch adds
a calling convention attribute to be used in code compiled with the
target-dependent triple, which will generate code using the le32-style
bitcode. This calling convention does not need to be explicitly
supported in the backend because it determines bitcode representation
rather than native conventions (the backend just needs to undersand
how to handle byval and sret for the Native Client OS).
This patch implements __attribute__((pnaclcall)) to generate calls in
bitcode according to the le32 bitcode conventions, an attribute which
is accepted by any Native Client target, but issues a warning
otherwise.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166065 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-16 22:30:41 +00:00
Fariborz Jahanian
88d285cc0f
Fixes location of overriding declaration with no comment
...
of their own.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165972 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-15 20:57:52 +00:00
Fariborz Jahanian
6553c686cb
structured document comment: patch to provide comment for overriding function
...
template when comment is comming from overridden declaration.
// rdar://12378793
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165953 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-15 18:58:50 +00:00
Ted Kremenek
7642b9a55e
Further harden checking that scan-view isn't serving up pages outside
...
the server root.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165839 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-12 22:56:38 +00:00
Ted Kremenek
44cbe67dc0
Have scan-view guard against serving up pages outside the root directory.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165815 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-12 19:16:31 +00:00
NAKAMURA Takumi
3c5527e939
c-index-test.c: /* Use C style comment. */
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165797 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-12 14:25:52 +00:00
Fariborz Jahanian
749ace614b
search for overridden methods with comment when overriding method
...
has none of its own. Factor in Doug's comments.
// rdar://12378793
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165771 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-11 23:52:50 +00:00
Sean Silva
b43d87b064
Remove pointless classof()'s.
...
Updates to llvm/Support/Casting.h have rendered these classof()'s
irrelevant.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165770 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-11 23:31:23 +00:00
Argyrios Kyrtzidis
0ef983e89c
[libclang] Make sure the index_data.main_filename field is initialized
...
in c-index-test. index_enteredMainFile is not invoked when indexing a
module file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165735 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-11 19:38:23 +00:00
Argyrios Kyrtzidis
8003fd6137
[libclang] Add tests for indexing modules and PCHs using modules.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165732 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-11 19:00:44 +00:00
Argyrios Kyrtzidis
900ab95e12
[libclang] Improve AST serialization done by ASTUnit::Save().
...
The ASTUnit needs to initialize an ASTWriter at the beginning of
parsing to fully handle serialization of a translation unit that
imports modules. Do this by introducing an option to enable it, which
corresponds to CXTranslationUnit_ForSerialization on the C API side.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165717 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-11 16:05:00 +00:00
Ted Kremenek
8b03277b0b
Teach set-xcode-analyzer that the new default value for ExecPath is CLANG_ANALYZER_EXEC.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165681 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-11 00:40:41 +00:00
Fariborz Jahanian
bf967be66e
[Doc parsing] This patch searches overridden objc/c++
...
methods looking for documentation on a particular base
class inherited by any method that overrides the base class.
In case of redeclaration, as when objc method is defined
in the implementation, it also looks up for documentation
in class/class extension being redeclared.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165643 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-10 18:34:52 +00:00
Jordan Rose
1e4691b9d8
Rename ObjCMethodDecl::isSynthesized to isPropertyAccessor.
...
This more accurately reflects its use: this flag is set when a method
matches the getter or setter name for a property in the same class,
and does not actually specify whether or not the definition of the method
will be synthesized (either implicitly or explicitly with @synthesize).
This renames the setter and backing field as well, and changes the
(soon-to-be-obsolete?) XML dump format to use 'property_accessor'
instead of 'synthesized'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165626 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-10 16:42:25 +00:00
NAKAMURA Takumi
ff2fb961dc
[CMake] clang/tools/extra may be included by LLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR.
...
LLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR=/path/to/llvm-srcroot/tools/clang/tools/extra, by default.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165620 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-10 13:46:18 +00:00
Bill Wendling
d34eca2a5b
Place temporary LTO files into their own subdirectory.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165600 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-10 05:30:49 +00:00
Argyrios Kyrtzidis
93cd6e8e17
Disable the preprocessing record when indexing a source file
...
and modules are not enabled.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165593 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-10 02:12:50 +00:00
Argyrios Kyrtzidis
62288edde2
When indexing a module file, for the ppIncludedFile callback give
...
an invalid location if the location points to the synthetic buffer
for the module input.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165592 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-10 02:12:47 +00:00
Bob Wilson
1be79391b3
Revert "Use a special path to place the .o files in."
...
This reverts commit 165429 in an attempt to get our buildbots going.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165573 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-09 23:57:08 +00:00
Argyrios Kyrtzidis
21c3607282
Move the logic that searches for overridden methods from libclang to
...
ASTContext so that it can be widely available.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165473 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-09 01:23:50 +00:00
Bill Wendling
09655fcc08
Use a special path to place the .o files in.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165429 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-08 21:17:59 +00:00
Micah Villmow
25a6a84cf5
Move TargetData to DataLayout.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165395 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-08 16:25:52 +00:00
Argyrios Kyrtzidis
53d6ded0ed
[libclang] Don't disable the preprocessing record while indexing so as
...
to not mess up with module building.
It was not worth trying to combine indexing without preprocessing record
and building modules with one because:
-just importing a module/PCH that was built with a pp record, enables it anyway
-the performance gain of indexing without the preprocessing record is insignificant.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165352 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-06 01:18:35 +00:00
Ted Kremenek
efdfc1d38b
Add color output to 'diagtool tree' to show what warnings are enabled by default.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165338 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-05 22:07:14 +00:00
Argyrios Kyrtzidis
134d1e8a0b
[libclang] Now that we have a CXModule object, pass it to the
...
importedASTFile indexing callback.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165281 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-05 00:22:40 +00:00
Argyrios Kyrtzidis
5d04b1af7b
[libclang] Introduce new C functions that provide information about modules:
...
clang_Cursor_getModule
clang_Module_getParent
clang_Module_getName
clang_Module_getFullName
clang_Module_getNumTopLevelHeaders
clang_Module_getTopLevelHeader
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165280 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-05 00:22:37 +00:00
Argyrios Kyrtzidis
6a01012e6b
[libclang] Introduce CXCursor_ModuleImportDecl cursor kind, used for a module
...
import declaration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165277 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-05 00:22:24 +00:00
Bill Wendling
731a26202d
Add an explicit -object_path_lto flag during linking with a uniquified temporary
...
file name if building Apple-style.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165184 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-03 23:49:57 +00:00
Bill Wendling
2ceac2dc62
Remove the directory that these are already in.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165162 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-03 21:08:21 +00:00
Argyrios Kyrtzidis
3da76bfbd2
[libclang] When indexing, invoke the importedASTFile for PCH files as well.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165161 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-03 21:05:51 +00:00
Argyrios Kyrtzidis
37f2f52fbc
[libclang] Simplify indexing of module imports by handling implicit
...
imports via ImportDecls.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165160 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-03 21:05:44 +00:00
Benjamin Kramer
1215057517
clang-check: Add clangRewriteCore.a to the Makefile build to make it link again.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165119 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-03 14:35:38 +00:00
Daniel Jasper
5e5f726a90
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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165110 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-03 13:28:43 +00:00