Commit Graph

2341 Commits

Author SHA1 Message Date
Fariborz Jahanian 9d2f1e753b [doc parsing] use getParamName to access parameter
for current(rewritten) comment and getParamNameAsWritten
to access param name coming with \param marker.

llvm-svn: 166231
2012-10-18 21:42:42 +00:00
NAKAMURA Takumi dbefa9b081 libclang/CXComment.cpp: Fix abuse of StringRef.
llvm-svn: 166163
2012-10-18 01:38:53 +00:00
Argyrios Kyrtzidis 5e2ec486bb [libclang] Invoke a ppIncludedFile callback when indexing implicit module imports.
llvm-svn: 166161
2012-10-18 00:17:05 +00:00
Fariborz Jahanian a7d76d2672 [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.

llvm-svn: 166130
2012-10-17 21:58:03 +00:00
Derek Schuff a202096dc0 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.

llvm-svn: 166065
2012-10-16 22:30:41 +00:00
Fariborz Jahanian bbd469bef3 Fixes location of overriding declaration with no comment
of their own.

llvm-svn: 165972
2012-10-15 20:57:52 +00:00
Fariborz Jahanian 14ec3f3acb structured document comment: patch to provide comment for overriding function
template when comment is comming from overridden declaration. 
// rdar://12378793

llvm-svn: 165953
2012-10-15 18:58:50 +00:00
Ted Kremenek 639a17a229 Further harden checking that scan-view isn't serving up pages outside
the server root.

llvm-svn: 165839
2012-10-12 22:56:38 +00:00
Ted Kremenek 3073c58cab Have scan-view guard against serving up pages outside the root directory.
llvm-svn: 165815
2012-10-12 19:16:31 +00:00
NAKAMURA Takumi e259d912ab c-index-test.c: /* Use C style comment. */
llvm-svn: 165797
2012-10-12 14:25:52 +00:00
Fariborz Jahanian 42e31323b6 search for overridden methods with comment when overriding method
has none of its own. Factor in Doug's comments.
// rdar://12378793

llvm-svn: 165771
2012-10-11 23:52:50 +00:00
Sean Silva e2bb2ff576 Remove pointless classof()'s.
Updates to llvm/Support/Casting.h have rendered these classof()'s
irrelevant.

llvm-svn: 165770
2012-10-11 23:31:23 +00:00
Argyrios Kyrtzidis 8585f140bf [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.

llvm-svn: 165735
2012-10-11 19:38:23 +00:00
Argyrios Kyrtzidis 9f57186983 [libclang] Add tests for indexing modules and PCHs using modules.
llvm-svn: 165732
2012-10-11 19:00:44 +00:00
Argyrios Kyrtzidis 0db720f0dc [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.

llvm-svn: 165717
2012-10-11 16:05:00 +00:00
Ted Kremenek 45df60c1f3 Teach set-xcode-analyzer that the new default value for ExecPath is CLANG_ANALYZER_EXEC.
llvm-svn: 165681
2012-10-11 00:40:41 +00:00
Fariborz Jahanian 1c883b9b57 [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.

llvm-svn: 165643
2012-10-10 18:34:52 +00:00
Jordan Rose d01e83ab3e 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'.

llvm-svn: 165626
2012-10-10 16:42:25 +00:00
NAKAMURA Takumi e9894029ba [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.

llvm-svn: 165620
2012-10-10 13:46:18 +00:00
Bill Wendling 59068d1302 Place temporary LTO files into their own subdirectory.
llvm-svn: 165600
2012-10-10 05:30:49 +00:00
Argyrios Kyrtzidis 15f6b8ebe8 Disable the preprocessing record when indexing a source file
and modules are not enabled.

llvm-svn: 165593
2012-10-10 02:12:50 +00:00
Argyrios Kyrtzidis e445c7236e 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.

llvm-svn: 165592
2012-10-10 02:12:47 +00:00
Bob Wilson 0e504ff797 Revert "Use a special path to place the .o files in."
This reverts commit 165429 in an attempt to get our buildbots going.

llvm-svn: 165573
2012-10-09 23:57:08 +00:00
Argyrios Kyrtzidis b9556e695f Move the logic that searches for overridden methods from libclang to
ASTContext so that it can be widely available.

llvm-svn: 165473
2012-10-09 01:23:50 +00:00
Bill Wendling 99b0092a40 Use a special path to place the .o files in.
llvm-svn: 165429
2012-10-08 21:17:59 +00:00
Micah Villmow dd31ca10ef Move TargetData to DataLayout.
llvm-svn: 165395
2012-10-08 16:25:52 +00:00
Argyrios Kyrtzidis 6a80e7564f [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.

llvm-svn: 165352
2012-10-06 01:18:35 +00:00
Ted Kremenek 450f9f29b2 Add color output to 'diagtool tree' to show what warnings are enabled by default.
llvm-svn: 165338
2012-10-05 22:07:14 +00:00
Argyrios Kyrtzidis dc78f3e7a9 [libclang] Now that we have a CXModule object, pass it to the
importedASTFile indexing callback.

llvm-svn: 165281
2012-10-05 00:22:40 +00:00
Argyrios Kyrtzidis 2b9b5bb697 [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

llvm-svn: 165280
2012-10-05 00:22:37 +00:00
Argyrios Kyrtzidis 50e5b1dab3 [libclang] Introduce CXCursor_ModuleImportDecl cursor kind, used for a module
import declaration.

llvm-svn: 165277
2012-10-05 00:22:24 +00:00
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