Eli Friedman [Tue, 20 Aug 2013 00:39:40 +0000 (00:39 +0000)]
Fix name lookup with dependent using decls.
We previously mishandled UnresolvedUsingValueDecls in
NamedDecl::declarationReplaces, which caused us to forget decls
when there are multiple dependent using decls for the same name.
Fixes PR16936.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188737
91177308-0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 20 Aug 2013 00:07:23 +0000 (00:07 +0000)]
ObjectiveC migrator: More work towards
insertion of ObjC audit pragmas.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188733
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Mon, 19 Aug 2013 23:57:44 +0000 (23:57 +0000)]
clang-cl: Ignore the /wd n flag for disabling a warning
Clang doesn't have a table mapping cl.exe to clang warnings. While some
warnings like -Wsign-compare exist in both compilers, the majority do
not correspond and should usually be ignored.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188732
91177308-0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Mon, 19 Aug 2013 23:54:35 +0000 (23:54 +0000)]
[analyzer] Note that deadcode.UnmodifiedVariable would be an opt-in checker.
Website-only change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188731
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Mon, 19 Aug 2013 23:52:36 +0000 (23:52 +0000)]
clang-cl: Add /MP[n] to the list of unsupported and ignored flags
This flag tells cl.exe to use up to n processes to compile the provided
source files. I have no plans to implement this in clang.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188729
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Mon, 19 Aug 2013 23:08:53 +0000 (23:08 +0000)]
Fix last commit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188724
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Mon, 19 Aug 2013 22:20:37 +0000 (22:20 +0000)]
Simplify code by using CreateMemTemp. No functional change intended.
Reviewer: Eli
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188722
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 19 Aug 2013 22:12:56 +0000 (22:12 +0000)]
Handle init lists and _Atomic fields.
Fixes PR16931.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188718
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Mon, 19 Aug 2013 22:06:05 +0000 (22:06 +0000)]
PR16727: don't try to evaluate a potentially value-dependent expression when
checking for missing parens in &&/|| expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188716
91177308-0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 19 Aug 2013 22:00:50 +0000 (22:00 +0000)]
ObjectiveC migrator: Start inserting
CF_IMPLICIT_BRIDGING_ENABLE/CF_IMPLICIT_BRIDGING_DISABLED
pair. wip.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188714
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 19 Aug 2013 21:02:26 +0000 (21:02 +0000)]
PR16933: Don't try to codegen things after we've seen errors.
Refactor the underlying code a bit to remove unnecessary calls to
"hasErrorOccurred" & make them consistently at all the entry points to
the IRGen ASTConsumer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188707
91177308-0d34-0410-b5e6-
96231b3b80d8
Robert Wilhelm [Mon, 19 Aug 2013 20:51:20 +0000 (20:51 +0000)]
const'ify Sema::ActOnCompoundStmt by
changing Parameter of Sema::ActOnCompoundStmt from MutableArrayRef to
ArrayRef.
No functionality change intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188705
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Mon, 19 Aug 2013 20:23:37 +0000 (20:23 +0000)]
Bump the value of the __APPLE_CC__ predefined macro up to 6000.
The previous value was set to match some ancient version of Apple's GCC.
The value should be higher than anything used by Apple's GCC, but we don't
intend for this value to be updated in the future. We have other macros to
identify compiler versions. <rdar://problem/
14749599>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188700
91177308-0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 19 Aug 2013 19:13:34 +0000 (19:13 +0000)]
ObjectiveC migrator. Start auditing CF functions
for possible use of CF_IMPLICIT_BRIDGING_ENABLE
pragma.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188691
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Mon, 19 Aug 2013 18:46:16 +0000 (18:46 +0000)]
Revert "Revert "Revert "DebugInfo: Omit debug info for dynamic classes in TUs that do not have the vtable for that class"""
This reverts commit r188642.
This change is causing LTO builds to cause our 16 GB machines to swap and OOM
all weekend. I am going to work with Dave Blaikie to resolve the issue.
Sorry Dave =(.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188687
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 19 Aug 2013 18:35:25 +0000 (18:35 +0000)]
Simplify assert-neutral matching in test case.
Originally committed in r188651, improved/fixed to be assert-neutral by
Takumi in r188661.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188686
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Mon, 19 Aug 2013 18:32:59 +0000 (18:32 +0000)]
clang-cl: Expose the -Xclang option
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188685
91177308-0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Mon, 19 Aug 2013 17:46:55 +0000 (17:46 +0000)]
[analyzer] Add a triple to test/Analysis/cfg.cpp
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188683
91177308-0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Mon, 19 Aug 2013 17:03:12 +0000 (17:03 +0000)]
[analyzer] Don't run unreachable code checker on inlined functions.
This is still an alpha checker, but we use it in certain tests to make sure
something is not being executed.
This should fix the buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188682
91177308-0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Mon, 19 Aug 2013 16:27:37 +0000 (16:27 +0000)]
[analyzer] Add "unmodified variable" checker to the Potential Checkers.
This is PR16890.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188681
91177308-0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Mon, 19 Aug 2013 16:27:34 +0000 (16:27 +0000)]
[analyzer] Assume that strings are no longer than SIZE_MAX/4.
This keeps the analyzer from making silly assumptions, like thinking
strlen(foo)+1 could wrap around to 0. This fixes PR16558.
Patch by Karthik Bhat!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188680
91177308-0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Mon, 19 Aug 2013 16:27:28 +0000 (16:27 +0000)]
Omit arguments of __builtin_object_size from the CFG.
This builtin does not actually evaluate its arguments for side effects,
so we shouldn't include them in the CFG. In the analyzer, rely on the
constant expression evaluator to get the proper semantics, at least for
now. (In the future, we could get ambitious and try to provide path-
sensitive size values.)
In theory, this does pose a problem for liveness analysis: a variable can
be used within the __builtin_object_size argument expression but not show
up as live. However, it is very unlikely that such a value would be used
to compute the object size and not used to access the object in some way.
<rdar://problem/
14760817>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188679
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Mon, 19 Aug 2013 16:14:33 +0000 (16:14 +0000)]
Use cstdio instead of stdio.h
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188678
91177308-0d34-0410-b5e6-
96231b3b80d8
Pavel Labath [Mon, 19 Aug 2013 15:23:34 +0000 (15:23 +0000)]
[analyzer] Fix inefficiency in dead symbol removal
Summary:
ScanReachableSymbols uses a "visited" set to avoid scanning the same object
twice. However, it did not use the optimization for LazyCompoundVal objects,
which resulted in exponential complexity for long chains of temporary objects.
Adding this resulted in a decrease of analysis time from >3h to 3 seconds for
some files.
Reviewers: jordan_rose
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1398
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188677
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Mon, 19 Aug 2013 13:59:22 +0000 (13:59 +0000)]
Re-apply r188666
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188675
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Mon, 19 Aug 2013 13:07:12 +0000 (13:07 +0000)]
Fix -Wcovered-switch-default warning from r188664
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188672
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 19 Aug 2013 11:51:51 +0000 (11:51 +0000)]
clang/Driver: [PR12920] Don't forward any -W arguments to gcc-as and gcc-ld.
AFAIK, there are no -W options for gcc-as and gcc-ld.
It caused failure to build clang with gcc-4.7 on cygwin.
FIXME: Could we recategorize Options for gcc-as and gcc-ld?
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188668
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Mon, 19 Aug 2013 11:42:54 +0000 (11:42 +0000)]
Revert r188666: it breaks the buildbots
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188667
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Mon, 19 Aug 2013 10:41:30 +0000 (10:41 +0000)]
Fix PR16768: properly report malformed sanitizer blacklist file contents
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188666
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Mon, 19 Aug 2013 10:16:18 +0000 (10:16 +0000)]
clang-format: Fix return type line break decision.
This accidentally introduced by r186077, as function names were not
correctly recognized in templated declarations.
Before:
template <class TemplateIt>
SomeReturnType
SomeFunction(TemplateIt begin, TemplateIt end, TemplateIt* stop) {}
After:
template <class TemplateIt>
SomeReturnType SomeFunction(TemplateIt begin, TemplateIt end,
TemplateIt* stop) {}
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188665
91177308-0d34-0410-b5e6-
96231b3b80d8
Robert Lytton [Mon, 19 Aug 2013 09:46:39 +0000 (09:46 +0000)]
XCore target: Add target specific EmitVAArg
This is so aggregates can be passed as var args too.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188664
91177308-0d34-0410-b5e6-
96231b3b80d8
Robert Lytton [Mon, 19 Aug 2013 09:46:32 +0000 (09:46 +0000)]
XCore target: correct test layout
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188663
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Mon, 19 Aug 2013 09:45:19 +0000 (09:45 +0000)]
Explicitly specify triple in driver test from r188660
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188662
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 19 Aug 2013 09:37:23 +0000 (09:37 +0000)]
clang/test/CodeGenObjC/2010-02-09-DbgSelf.m: Tweak for -Asserts in r188651.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188661
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Mon, 19 Aug 2013 09:14:21 +0000 (09:14 +0000)]
Move SanitizerArgs to the clang Driver
Summary:
This change turns SanitizerArgs into high-level options
stored in the Driver, which are parsed lazily. This fixes an issue of multiple copies of the same diagnostic message produced by sanitizer arguments parser.
Reviewers: rsmith
Reviewed By: rsmith
CC: chandlerc, eugenis, cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1341
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188660
91177308-0d34-0410-b5e6-
96231b3b80d8
Robert Wilhelm [Mon, 19 Aug 2013 07:57:02 +0000 (07:57 +0000)]
Omit llvm:: before makeArrayRef. We have using directive in this file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188659
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Mon, 19 Aug 2013 07:13:02 +0000 (07:13 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188658
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Mon, 19 Aug 2013 07:10:13 +0000 (07:10 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188657
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 19 Aug 2013 03:41:04 +0000 (03:41 +0000)]
Fix indentation. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188652
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 19 Aug 2013 03:37:48 +0000 (03:37 +0000)]
DebugInfo: Do not include line/file info for artificial parameters & parameters of artificial functions
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188651
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 19 Aug 2013 03:11:34 +0000 (03:11 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188648
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Mon, 19 Aug 2013 02:43:08 +0000 (02:43 +0000)]
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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188647
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 18 Aug 2013 20:38:37 +0000 (20:38 +0000)]
Revert r188644 to unbreak buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188645
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 18 Aug 2013 20:03:21 +0000 (20:03 +0000)]
Remove Stmt::operator new that takes a ASTContext*. All callers use the ASTContext& version.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188644
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Sun, 18 Aug 2013 17:59:12 +0000 (17:59 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188642
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 18 Aug 2013 17:45:38 +0000 (17:45 +0000)]
Remove throw() from Stmt::operator new so the compiler will omit the null check on the result since ASTContext allocator won't return null.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188641
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Sun, 18 Aug 2013 17:36:19 +0000 (17:36 +0000)]
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).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188640
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Sun, 18 Aug 2013 16:55:33 +0000 (16:55 +0000)]
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)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188639
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sun, 18 Aug 2013 15:03:03 +0000 (15:03 +0000)]
InitHeaderSearch.cpp: [Cygwin] Add 4.7.3.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188638
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 18 Aug 2013 10:09:15 +0000 (10:09 +0000)]
Make expression allocation methods use a 'const' reference to the ASTContext since the underlying operator new only needs a const reference.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188636
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Sun, 18 Aug 2013 07:57:43 +0000 (07:57 +0000)]
libclang: cleanup unused includes in public header
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188625
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 18 Aug 2013 07:20:52 +0000 (07:20 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188623
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Sun, 18 Aug 2013 04:50:23 +0000 (04:50 +0000)]
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).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188622
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sun, 18 Aug 2013 03:48:57 +0000 (03:48 +0000)]
{c-index-test|c-arcmt-test}/Makefile: Update USEDLIBS along corresponding to clangIndex.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188621
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Sat, 17 Aug 2013 20:01:53 +0000 (20:01 +0000)]
PR16927: Don't assert (or, previously, skip) static data members of enumeration type
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188612
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Sat, 17 Aug 2013 16:40:09 +0000 (16:40 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188609
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Yartsev [Sat, 17 Aug 2013 15:43:19 +0000 (15:43 +0000)]
+ make scan-build work with Strawberry Perl, ActiveState Perl, cygwin perl and msys perl ports.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188607
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Sat, 17 Aug 2013 00:51:11 +0000 (00:51 +0000)]
Fix indentation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188603
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Sat, 17 Aug 2013 00:46:16 +0000 (00:46 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188602
91177308-0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sat, 17 Aug 2013 00:40:41 +0000 (00:40 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188601
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Sat, 17 Aug 2013 00:06:55 +0000 (00:06 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188600
91177308-0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 16 Aug 2013 23:35:05 +0000 (23:35 +0000)]
ObjectiveC migrator: Add some more routines
for future work. No change otherwise.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188591
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 16 Aug 2013 23:18:50 +0000 (23:18 +0000)]
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)) = "";
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188588
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 16 Aug 2013 23:14:22 +0000 (23:14 +0000)]
Use the number of parameters in the actual method or function to determine the CallEffects size.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188587
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 16 Aug 2013 22:52:07 +0000 (22:52 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188585
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 16 Aug 2013 21:57:14 +0000 (21:57 +0000)]
RetainCountChecker: Replace some loops with std:: algorithms.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188581
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 16 Aug 2013 21:57:06 +0000 (21:57 +0000)]
Replace some DenseMap keys with simpler structures that don't need another DenseMapInfo specialization.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188580
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 16 Aug 2013 21:54:22 +0000 (21:54 +0000)]
Revert r188574. Turns out it isn't needed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188578
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 16 Aug 2013 20:40:29 +0000 (20:40 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188576
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 16 Aug 2013 20:40:25 +0000 (20:40 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188575
91177308-0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 16 Aug 2013 20:23:36 +0000 (20:23 +0000)]
Need summary info. about arguments to
CF functions coming from static analyzer API.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188574
91177308-0d34-0410-b5e6-
96231b3b80d8
DeLesley Hutchins [Fri, 16 Aug 2013 18:28:00 +0000 (18:28 +0000)]
Thread safety analysis: new test case
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188571
91177308-0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 16 Aug 2013 18:17:55 +0000 (18:17 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188569
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 16 Aug 2013 16:46:27 +0000 (16:46 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188562
91177308-0d34-0410-b5e6-
96231b3b80d8
Samuel Benzaquen [Fri, 16 Aug 2013 16:19:42 +0000 (16:19 +0000)]
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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188560
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Fri, 16 Aug 2013 13:42:41 +0000 (13:42 +0000)]
Passing false instead of 0; no functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188553
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Fri, 16 Aug 2013 13:34:39 +0000 (13:34 +0000)]
Passing false instead of 0; no functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188552
91177308-0d34-0410-b5e6-
96231b3b80d8
Edwin Vane [Fri, 16 Aug 2013 12:18:53 +0000 (12:18 +0000)]
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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188550
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Fri, 16 Aug 2013 11:20:30 +0000 (11:20 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188543
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Fri, 16 Aug 2013 10:35:31 +0000 (10:35 +0000)]
Revert r188498.
This change broke release+asserts build with compiler-rt.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188539
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Fri, 16 Aug 2013 08:29:13 +0000 (08:29 +0000)]
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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188536
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 16 Aug 2013 06:22:23 +0000 (06:22 +0000)]
Fix typo pointed out by Jordan.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188535
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Fri, 16 Aug 2013 03:15:10 +0000 (03:15 +0000)]
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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188531
91177308-0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Fri, 16 Aug 2013 01:06:30 +0000 (01:06 +0000)]
[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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188514
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 16 Aug 2013 00:09:18 +0000 (00:09 +0000)]
Don't allow unary negation on scoped enums.
PR16900.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188511
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 15 Aug 2013 23:59:20 +0000 (23:59 +0000)]
Fix for dependent contexts in alias templates.
When we are parsing a type for an alias template, we are not entering
the context, so we can't look into dependent classes. Make sure the
parser handles this correctly.
PR16904.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188510
91177308-0d34-0410-b5e6-
96231b3b80d8
DeLesley Hutchins [Thu, 15 Aug 2013 23:06:33 +0000 (23:06 +0000)]
Thread Safety Analysis: fix bug when using TryLock with && and || expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188505
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 15 Aug 2013 22:50:29 +0000 (22:50 +0000)]
DebugInfo: CollectRecordStaticField -> CreateRecordStaticField to return its result.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188501
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 15 Aug 2013 22:42:12 +0000 (22:42 +0000)]
Remove unnecessary explicit cast.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188500
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 15 Aug 2013 22:30:23 +0000 (22:30 +0000)]
DebugInfo: Split out the implementation of getStaticDataMemberDeclaration for future use
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188498
91177308-0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 15 Aug 2013 22:26:10 +0000 (22:26 +0000)]
ObjetiveC migrator: fix the test in my last patch
to define real CF_RETURNS_RETAINED/CF_NO_RETURNS_RETAINED
pairs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188497
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 15 Aug 2013 22:18:13 +0000 (22:18 +0000)]
Fix assert added in r188494
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188496
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 15 Aug 2013 22:02:56 +0000 (22:02 +0000)]
Properly track l-paren of a CXXFucntionalCastExpr.
In addition to storing more useful information in the AST, this
fixes a semantic check in template instantiation which checks whether
the l-paren location is valid.
Fixes PR16903.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188495
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 15 Aug 2013 21:55:56 +0000 (21:55 +0000)]
DebugInfo: Remove unused conditional
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188494
91177308-0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 15 Aug 2013 21:44:38 +0000 (21:44 +0000)]
ObjectiveC migrator. Start annotating CF functions
with CF_RETURNS_RETAINED/CF_RETURNS_NOT_RETAINED as
appropriate.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188493
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 15 Aug 2013 21:42:43 +0000 (21:42 +0000)]
DebugInfo: Make CGDebugInfo::getStaticDataMemberDeclaration's argument type match the semantics
Rather than having a cast immediately inside the function, push that
type requirement out to the callers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188492
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 15 Aug 2013 21:21:19 +0000 (21:21 +0000)]
DebugInfo: Add a FIXME, remove a FIXME.
(the removed FIXME no longer applies since we made this debug info
optimization not apply to C)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188491
91177308-0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Thu, 15 Aug 2013 20:54:45 +0000 (20:54 +0000)]
make arm-use-movt available for all ARM
This updates clang according to a pending patch for llvm to
rename of the -arm-darwin-use-movt to arm-use-movt to make
it available for all of ARM.
note: please apply this close to the llvm change.
Patch by Jeroen Hofstee.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188488
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 15 Aug 2013 20:49:17 +0000 (20:49 +0000)]
DebugInfo: Unify & optimize the lazy addition of record types
Rather than going through the whole getOrCreateType machinery to
manifest a type, cut straight to the implementation because we know we
have to do work.
While the previous implementation was sufficient for the two cases
(completeness and required completeness) we have already (the general
machinery could inspect the type for those attributes & go down the full
definition path), a pending change (to emit info for types when we emit
their vtables) won't have that luxury & we'll need to force the creation
rather than relying on the general purpose routine.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188486
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 15 Aug 2013 20:17:25 +0000 (20:17 +0000)]
DebugInfo: Revert change to the return type of createRecordFwdDecl
It still does only return DICompositeType, but I've no need to make that
change right now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188482
91177308-0d34-0410-b5e6-
96231b3b80d8