Commit Graph

47177 Commits

Author SHA1 Message Date
Robert Wilhelm 88e024969b Omit llvm:: before makeArrayRef. We have using directive in this file.
llvm-svn: 188659
2013-08-19 07:57:02 +00:00
Dmitri Gribenko b3e8172e9e Comment parsing tests: move tests where they belong
Move C++-specific tests that were checking if we attach a base class comment to
a derived class to an existing test comment-to-html-xml-conversion.cpp.  Note
that the original testing approach was not actually testing the class--comment
relationship.  It only checked that we attached the comment *somewhere*.

The rest of subclass-comment.mm should be also moved elsewhere.

llvm-svn: 188658
2013-08-19 07:13:02 +00:00
Dmitri Gribenko 46dd39ed3c Comment parsing tests: move tests where they belong
comment-misc-tags.m is mostly about miscellaneous Doxygen tags.  Move out tests
that check if the comment is attached to an ObjC decl.  Because the exitsting
test for this is in C++ (annotate-comments.cpp), create a new test --
annotate-comments-objc.m.

The rest of comment-misc-tags.m should be also moved elsewhere.

llvm-svn: 188657
2013-08-19 07:10:13 +00:00
Craig Topper 964157146d Fix indentation. No functional change.
llvm-svn: 188652
2013-08-19 03:41:04 +00:00
David Blaikie 7fceebf5aa DebugInfo: Do not include line/file info for artificial parameters & parameters of artificial functions
llvm-svn: 188651
2013-08-19 03:37:48 +00:00
Craig Topper e691fce6e4 Make the version of Stmt::operator new that takes ASTContext* call the ASTContext& version in Stmt inline instead of having two out of line functions that both call to the global versions.
llvm-svn: 188648
2013-08-19 03:11:34 +00:00
David Majnemer af71402e7b Sema: Remove dead code in CheckTemplateArgumentAddressOfObjectOrFunction
Summary:
DeclRefExpr::getDecl gives us back a ValueDecl, this isa<> check will
never fire.

Reviewers: eli.friedman, doug.gregor, majnemer

Reviewed By: majnemer

CC: cfe-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D1434

llvm-svn: 188647
2013-08-19 02:43:08 +00:00
Craig Topper 048b883416 Revert r188644 to unbreak buildbots.
llvm-svn: 188645
2013-08-18 20:38:37 +00:00
Craig Topper 260f7e6893 Remove Stmt::operator new that takes a ASTContext*. All callers use the ASTContext& version.
llvm-svn: 188644
2013-08-18 20:03:21 +00:00
David Blaikie 25b2085490 Revert "Revert "DebugInfo: Omit debug info for dynamic classes in TUs that do not have the vtable for that class""
This reverts commit r188600.

r188640/r188639 fixed the root cause of the crash-on-valid that r188600
originally introduced. This now appears to bootstrap debug clang
successfully to the best of my testing.

llvm-svn: 188642
2013-08-18 17:59:12 +00:00
Craig Topper 5a050016bb Remove throw() from Stmt::operator new so the compiler will omit the null check on the result since ASTContext allocator won't return null.
llvm-svn: 188641
2013-08-18 17:45:38 +00:00
David Blaikie d278589329 DebugInfo: Avoid duplicating types that may be created during the process of creating their context
A partner to r188639, this is a somewhat heavy-handed fix to the general
issue, since even after that prior change the issue does still
unavoidably arise with template parameters (see test case).

There are other ways we could consider addressing this (see FIXME).

llvm-svn: 188640
2013-08-18 17:36:19 +00:00
David Blaikie adfbf993d6 DebugInfo: Don't emit vbase 'containing types' for context chain limited types
Possible minor reduction in debug info & avoid some cases where creating
a context chain could lead to the type the context chain is being
created for, being created. (this is still possible with template
parameters - tests/fixes/improvements to follow)

llvm-svn: 188639
2013-08-18 16:55:33 +00:00
NAKAMURA Takumi c96c699a16 InitHeaderSearch.cpp: [Cygwin] Add 4.7.3.
llvm-svn: 188638
2013-08-18 15:03:03 +00:00
Craig Topper 3793291d50 Make expression allocation methods use a 'const' reference to the ASTContext since the underlying operator new only needs a const reference.
llvm-svn: 188636
2013-08-18 10:09:15 +00:00
Dmitri Gribenko 96933de7f5 libclang: cleanup unused includes in public header
llvm-svn: 188625
2013-08-18 07:57:43 +00:00
Chandler Carruth 7deaae76ec Fix a use-after-free found in libclang when doing code completion. The
loop processing the candidates can cause new declerations to be added to
the context, invalidating lookup_result. To avoid that, make a copy of
the list of declarations to iterate over.

I don't have a way to check in a test case for this as it involves
a giant pile of source code and a generated PCH file used to accelerate
code completion, all of this running under ASan.

llvm-svn: 188623
2013-08-18 07:20:52 +00:00
David Blaikie 5043815a60 DebugInfo: don't require full definitions for friend classes
Fixes a crash-on-valid introduced by r188486 (which should've occurred
earlier but for a blatant bug where calling createFwdDecl from the
requireCompleteType callback was useless under -flimit-debug-info and we
were just getting lucky with other later callbacks requiring the type
anyway).

llvm-svn: 188622
2013-08-18 04:50:23 +00:00
NAKAMURA Takumi 6dd203288d {c-index-test|c-arcmt-test}/Makefile: Update USEDLIBS along corresponding to clangIndex.
llvm-svn: 188621
2013-08-18 03:48:57 +00:00
David Blaikie 949939cdbb PR16927: Don't assert (or, previously, skip) static data members of enumeration type
llvm-svn: 188612
2013-08-17 20:01:53 +00:00
Juergen Ributzka 2c2dbf4542 Fix the name and the type of the argument for intrinisc
_mm256_broadcastsi128_si256 to align with the Intel documentation.

This fixes bug PR 16581 and rdar:14747994.

llvm-svn: 188609
2013-08-17 16:40:09 +00:00
Anton Yartsev 9ddb5fe2d7 + make scan-build work with Strawberry Perl, ActiveState Perl, cygwin perl and msys perl ports.
llvm-svn: 188607
2013-08-17 15:43:19 +00:00
Richard Smith 2648fab8de Fix indentation.
llvm-svn: 188603
2013-08-17 00:51:11 +00:00
Richard Smith f9b1510576 Refactor all diagnosing of TypoCorrections through a common function, in
preparation for teaching this function how to diagnose a correction that
includes importing a module.

llvm-svn: 188602
2013-08-17 00:46:16 +00:00
Argyrios Kyrtzidis 15a2fccb78 Rename libIDE to libIndex.
Per feedback from Chandler, it's better to have libraries with more specific functionality.
LibIndex will contain the indexing functionality of libclang, which includes USR generation.

llvm-svn: 188601
2013-08-17 00:40:41 +00:00
David Blaikie 7d5d7c7e90 Revert "DebugInfo: Omit debug info for dynamic classes in TUs that do not have the vtable for that class"
This reverts commit r188576.

Reverting while I investigate a selfhosting buildbot failure on Darwin.

llvm-svn: 188600
2013-08-17 00:06:55 +00:00
Fariborz Jahanian 2ec4d7ba07 ObjectiveC migrator: Add some more routines
for future work. No change otherwise.

llvm-svn: 188591
2013-08-16 23:35:05 +00:00
Rafael Espindola 87198cd35c Don't reject attribute used in an "extern const" variable definition.
Before this patch we would warn and drop the attribute in
extern const char test3[] __attribute__((used)) = "";

llvm-svn: 188588
2013-08-16 23:18:50 +00:00
Ted Kremenek e19529b3d8 Use the number of parameters in the actual method or function to determine the CallEffects size.
llvm-svn: 188587
2013-08-16 23:14:22 +00:00
David Blaikie 9fdedec489 DebugInfo: Canonicalize namespaces to avoid emitting multiple namespaces with the same name but different lines
Updated test case to not rely on line numbers in more cases (it's hard
to use the @ check syntax for debug info test cases (due to the
interesting ordering of metadata) and this case in particular (given the
hash-line directive)) - left a few in there to cover the line number
information for these.

llvm-svn: 188585
2013-08-16 22:52:07 +00:00
Benjamin Kramer ab3838ab98 RetainCountChecker: Replace some loops with std:: algorithms.
llvm-svn: 188581
2013-08-16 21:57:14 +00:00
Benjamin Kramer 91c9867049 Replace some DenseMap keys with simpler structures that don't need another DenseMapInfo specialization.
llvm-svn: 188580
2013-08-16 21:57:06 +00:00
Ted Kremenek 63234c1bbd Revert r188574. Turns out it isn't needed.
llvm-svn: 188578
2013-08-16 21:54:22 +00:00
David Blaikie 9eddbbd563 DebugInfo: Omit debug info for dynamic classes in TUs that do not have the vtable for that class
This reduces Clang's .dwo (fission debug info) size by 23% over
Clang+LLVM.

llvm-svn: 188576
2013-08-16 20:40:29 +00:00
David Blaikie ab255bb9cf DebugInfo: Contrain the record type parameter for CollectRecordFields
This is the correct type (as is demonstrated by the fact that the caller
didn't need to change) & will be useful in a future patch.

llvm-svn: 188575
2013-08-16 20:40:25 +00:00
Fariborz Jahanian 36362016d3 Need summary info. about arguments to
CF functions coming from static analyzer API.

llvm-svn: 188574
2013-08-16 20:23:36 +00:00
DeLesley Hutchins d40542213c Thread safety analysis: new test case
llvm-svn: 188571
2013-08-16 18:28:00 +00:00
Argyrios Kyrtzidis 4b2b460893 Introduce the clangIDE library.
Libclang has a lot of functionality that is inaccessible.
The purpose of clangIDE is to move most of the functionality of libclang to it so we
can expose it and have libclang be more of a thin C wrapper over clangIDE.

Start by moving the USR generation functionality into clangIDE.

llvm-svn: 188569
2013-08-16 18:17:55 +00:00
Rafael Espindola d3f8b1f2b1 clang-format utils/TableGen/TableGen.cpp.
I have a patch that edits the file. Running clang-format first makes the patch
a lot easier to review.

llvm-svn: 188562
2013-08-16 16:46:27 +00:00
Samuel Benzaquen bd7d887f18 Refactor ArgumentAdaptativeMatcher matchers to remove the template from their declaration.
Summary:
Refactor ArgumentAdaptativeMatcher matchers to remove the template from their declaration.
This facilitates dynamic registration. Change the registry code to use the regular overload resolution mechanism for adaptative matchers.

Reviewers: klimek

CC: cfe-commits, revane

Differential Revision: http://llvm-reviews.chandlerc.com/D1402

llvm-svn: 188560
2013-08-16 16:19:42 +00:00
Aaron Ballman 5c5bdd374d Passing false instead of 0; no functional change intended.
llvm-svn: 188553
2013-08-16 13:42:41 +00:00
Aaron Ballman 3105f5ad69 Passing false instead of 0; no functional change intended.
llvm-svn: 188552
2013-08-16 13:34:39 +00:00
Edwin Vane 19f66290e4 Tweak Replacement comparisons
* Introduce operator< to replace Replacement::Less
* Make operator== and operator< on Replacements non-member functions
* Change order of comparisons in operator< to do string comparisons last

llvm-svn: 188550
2013-08-16 12:18:53 +00:00
Daniel Jasper de0328aea8 Split UnwrappedLineFormatter into individual components.
Goals: Structure code better and make components easier to use for
future features (e.g. column layout for long braced initializers).

No functional changes intended.

llvm-svn: 188543
2013-08-16 11:20:30 +00:00
Evgeniy Stepanov 37b3f73690 Revert r188498.
This change broke release+asserts build with compiler-rt.

llvm-svn: 188539
2013-08-16 10:35:31 +00:00
David Majnemer f0a84f200a Parse: Do not 'HandleTopLevelDecl' on templated functions.
Summary:
HandleTopLevelDecl on a templated function leads us to try and mangle
it.

Reviewers: rsmith

Reviewed By: rsmith

CC: cfe-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D1412

llvm-svn: 188536
2013-08-16 08:29:13 +00:00
Ted Kremenek 0803598b9b Fix typo pointed out by Jordan.
llvm-svn: 188535
2013-08-16 06:22:23 +00:00
Hans Wennborg 2393799609 Windows ToolChain: add VS bin dir to PogramPaths
We have a lot of fancy logic to find Visual Studio, which is currently used
to set the system header include paths.

Use the same code to set the ProgramPaths, which is used for finding programs
such as link.exe. Previously, Clang would just search PATH for link.exe,
but now it should find it if it's able to find Visual Studio.

Differential Revision: http://llvm-reviews.chandlerc.com/D1417

llvm-svn: 188531
2013-08-16 03:15:10 +00:00
Jordan Rose 367843a04c [analyzer] Merge TextPathDiagnostics and ClangDiagPathDiagConsumer.
This once again restores notes to following their associated warnings
in -analyzer-output=text mode. (This is still only intended for use as a
debugging aid.)

One twist is that the warning locations in "regular" analysis output modes
(plist, multi-file-plist, html, and plist-html) are reported at a different
location on the command line than in the output file, since the command
line has no path context. This commit makes -analyzer-output=text behave
like a normal output format, which means that the *command line output
will be different* in -analyzer-text mode. Again, since -analyzer-text is
a debugging aid and lo-fi stand-in for a regular output mode, this change
makes sense.

Along the way, remove a few pieces of stale code related to the path
diagnostic consumers.

llvm-svn: 188514
2013-08-16 01:06:30 +00:00
Eli Friedman 9ee175d8f0 Don't allow unary negation on scoped enums.
PR16900.

llvm-svn: 188511
2013-08-16 00:09:18 +00:00