| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
| |
The functionality is equivalent to the GCC attribute. Variables of tagged
types will be warned about as unused if they are not used in any way
except for possible (even non-trivial) ctors/dtors called. Useful for tagging
classes like std::string (which is not part of this commit).
llvm-svn: 186765
|
|
|
|
| |
llvm-svn: 186764
|
|
|
|
|
|
|
|
| |
Every #include is surrounded by #if 0 in order to comment it out, which adds
lines. That is fixed up right after, but that all can be inside #if part
that is not processed, so fix up also after every end of a conditional part.
llvm-svn: 186763
|
|
|
|
| |
llvm-svn: 186762
|
|
|
|
|
|
|
|
|
|
| |
Diag ID is used throughout clang as a sentinel id meaning "this is an
invalid diagnostic id." Confusingly, Diag ID maps to a valid, usable,
diagnostic id. Instead, start diagnostic ids at ID one.
Incidently, remove an unused element from StaticDiagInfo.
llvm-svn: 186760
|
|
|
|
|
|
|
| |
template. Passing around dependent types can lead to integral arguments that
cannot be evaluated.
llvm-svn: 186757
|
|
|
|
|
|
|
|
|
|
|
|
| |
A class with a field of non-POD-for-layout type is not POD-for-layout.
This computation should not depend on whether the field is of POD type
in the language sense.
Fixes PR16537.
Patch by Josh Magee.
llvm-svn: 186741
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is the same way GenericSelectionExpr works, and it's generally a
more consistent approach.
A large part of this patch is devoted to caching the value of the condition
of a ChooseExpr; it's needed to avoid threading an ASTContext into
IgnoreParens().
Fixes <rdar://problem/14438917>.
llvm-svn: 186738
|
|
|
|
|
|
|
|
| |
templates and explicit specializations
This patch essentially removes all the FIXMEs following calls to DeduceTemplateArguments() that want to keep track of deduction failure info.
llvm-svn: 186730
|
|
|
|
|
|
|
|
| |
diagnosis of bad template argument deductions."
This reverts commit a730f548325756d050d4caaa28fcbffdae8dfe95.
llvm-svn: 186729
|
|
|
|
|
|
|
| |
Make sure we correctly expand packs which expand to another
pack in a function type.
llvm-svn: 186728
|
|
|
|
|
|
| |
bad template argument deductions.
llvm-svn: 186727
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I'm not sure how to write a test for this; the following shows the
difference in -ast-dump:
template <int x> struct A {};
template <class T> struct B { };
template <class ...Args> using C = A<(__is_trivially_constructible(Args...))>;
template <class ...Args> using D = C<B<Args>...>;
However, I can't seem to write a test that triggers a visible difference
in behavior.
llvm-svn: 186726
|
|
|
|
|
|
|
| |
The mode doesn't actually do anything yet, but this provides a
way to get into it.
llvm-svn: 186720
|
|
|
|
|
|
|
|
|
|
|
|
| |
the selector family
Summary: In ARC mode, clang emits a warning if the result of an 'init' method is unused but miss cases where the method does not follows the Cocoa naming convention but is properly declared as an init family method.
CC: cfe-commits, eli.friedman
Differential Revision: http://llvm-reviews.chandlerc.com/D1163
llvm-svn: 186718
|
|
|
|
|
|
| |
declaration which can be migrated to NS_ENUM.
llvm-svn: 186716
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Add printToStream*(llvm::raw_ostream&) methods to Diagnostics, and reimplement everything based on streams instead of concatenating strings.
Also, fix some functions to start with lowercase to match the style guide.
Reviewers: klimek
CC: cfe-commits, revane
Differential Revision: http://llvm-reviews.chandlerc.com/D1187
llvm-svn: 186715
|
|
|
|
|
|
|
|
|
|
|
|
| |
Canonical types are unchanged. The type printer had to be changed to
avoid printing any non-default implicit calling convention as well as
the calling convention attribute.
Reviewers: rjmccall
Differential Revision: http://llvm-reviews.chandlerc.com/D1132
llvm-svn: 186714
|
|
|
|
|
|
|
|
|
|
| |
When we see a pack, and replace it with a template argument which is
also a pack, we want to use the pack pattern, not the expanded pack.
The caller should take care of expanding the pack afterwards.
Fixes PR16646.
llvm-svn: 186713
|
|
|
|
|
|
| |
-mcheck-zero-division.
llvm-svn: 186710
|
|
|
|
|
|
|
|
|
|
| |
"@synthesize of 'weak' property is only
allowed in ARC" errors.
rdar://14461559
llvm-svn: 186709
|
|
|
|
|
|
| |
single diagnostic that selects. No functional changes intended.
llvm-svn: 186708
|
|
|
|
| |
llvm-svn: 186707
|
|
|
|
| |
llvm-svn: 186702
|
|
|
|
|
|
| |
in file is an enum.
llvm-svn: 186700
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
__cpuid_count() as macros to be compatible with GCC's cpuid.h. It also adds
bit_<foo> constants for the various feature bits as described in version 039
(May 2011) of Intel's SDM Volume 2 in the description of the CPUID
instruction. The list of bit_<foo> constants is a bit exhaustive (GCC
doesn't do near this many). More bits could be added from a newer version of
SDM if desired.
Patch by John Baldwin!
llvm-svn: 186696
|
|
|
|
| |
llvm-svn: 186694
|
|
|
|
|
|
| |
Copies the x86 behavior.
llvm-svn: 186674
|
|
|
|
|
|
| |
Patch by Guillaume Papin.
llvm-svn: 186671
|
|
|
|
| |
llvm-svn: 186657
|
|
|
|
| |
llvm-svn: 186652
|
|
|
|
| |
llvm-svn: 186649
|
|
|
|
| |
llvm-svn: 186647
|
|
|
|
|
|
| |
NS_OPTIONS.
llvm-svn: 186641
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Sample output:
0. Program arguments: ...
1. <eof> parser at end of file
2. While analyzing stack:
#0 void inlined()
#1 void test()
3. crash-trace.c:6:3: Error evaluating statement
llvm-svn: 186639
|
|
|
|
| |
llvm-svn: 186638
|
|
|
|
|
|
|
| |
No new diagnostics, just better wording and notes pointing at more
relevant locations.
llvm-svn: 186629
|
|
|
|
|
|
|
| |
declaration when converting to NS_ENUM. This required
some code refactoring.
llvm-svn: 186619
|
|
|
|
| |
llvm-svn: 186617
|
|
|
|
|
|
|
|
|
|
|
|
| |
and add a new option --driver-mode= to control it explicitly.
The CCCIsCXX and CCCIsCPP flags were non-overlapping, i.e. there
are currently really three modes that Clang can run in: gcc, g++
or cpp, so it makes sense to represent them as an enum.
Having a command line flag to control it helps testing.
llvm-svn: 186605
|
|
|
|
|
|
| |
- wip.
llvm-svn: 186604
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
actual errors.
Summary:
Change how error messages are constructed and stored in Diagnostics.
Separate the notion of 'context' when recursing down in the parser and actual errors.
This will simplify adding some new features, like argument overloading and error recovery.
Reviewers: klimek
CC: cfe-commits, revane
Differential Revision: http://llvm-reviews.chandlerc.com/D1168
llvm-svn: 186602
|
|
|
|
|
|
| |
changes intended.
llvm-svn: 186591
|
|
|
|
|
|
| |
diagnostic's select list. Updates the tests for the more consistent diagnostic.
llvm-svn: 186584
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
void f() {
(a->*
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)(aaaa,
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb);
}
After:
void f() {
(a->*aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)(
aaaa, bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb);
}
Also add missing test case.
llvm-svn: 186583
|
|
|
|
|
|
|
| |
Use CaptureDroppedDiagnostics to make sure that there is a diagnostic
client installed when warning flags are parsed.
llvm-svn: 186582
|
|
|
|
|
|
| |
with other attribute handlers, as well as other attribute error messages. Added missing test cases for the unavailable attribute, and updated the deprecated test case.
llvm-svn: 186578
|
|
|
|
| |
llvm-svn: 186557
|
|
|
|
|
|
|
| |
use the conversion to bool to check if we've managed to get a type
that isn't default constructed - as we meant to in the first place.
llvm-svn: 186556
|
|
|
|
| |
llvm-svn: 186555
|