| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
Set invalid type of declarator after emitting error diagnostics,
so that it won't be later considered when instantiating the template.
Added test5_inst in test/SemaCXX/condition.cpp for non-regression.
llvm-svn: 172201
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
void aaaaaaaaaaaa(int aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) GUARDED_BY(
aaaaaaaaaaaaa);
After:
void aaaaaaaaaaaa(int aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)
GUARDED_BY(aaaaaaaaaaaaa);
Also did some formatting cleanups with clang-format on the way.
llvm-svn: 172200
|
| |
|
|
|
|
|
|
|
| |
Added option to put each constructor initializer on its own line
if not all initializers fit on a single line. Enabling this for
Google style now as the style guide (arguable) suggests it. Not
sure whether we also want it for LLVM.
llvm-svn: 172196
|
| |
|
|
| |
llvm-svn: 172195
|
| |
|
|
|
|
|
|
| |
As we keep adding more stuff to it, this structure is easier to
maintain. At one point we might think about making it an actual
class with specific accessors, etc.
llvm-svn: 172188
|
| |
|
|
|
|
| |
functionality change.
llvm-svn: 172185
|
| |
|
|
|
|
| |
support since 2.8.9 has been released some time ago.
llvm-svn: 172182
|
| |
|
|
| |
llvm-svn: 172179
|
| |
|
|
|
|
| |
support since 2.8.9 has been released some time ago.
llvm-svn: 172177
|
| |
|
|
|
|
| |
can be fixed
llvm-svn: 172170
|
| |
|
|
|
|
| |
This will get rid of some false positives as well as false negatives.
llvm-svn: 172169
|
| |
|
|
| |
llvm-svn: 172168
|
| |
|
|
|
|
|
|
|
|
| |
It's better to show no caret/ranges/fixits than to show them misaligned.
(It scares me a bit that Clang is going to show them misaligned on
systems without a proper llvm::sys::locale::columnWidth.) See PR14910.
This reverts commit a03cc72bedd015b7eb76e9ac650992f58a48549d.
llvm-svn: 172163
|
| |
|
|
| |
llvm-svn: 172161
|
| |
|
|
| |
llvm-svn: 172158
|
| |
|
|
| |
llvm-svn: 172154
|
| |
|
|
|
|
| |
llvm::sys::locale::columnWidth()
llvm-svn: 172152
|
| |
|
|
|
|
| |
external declarations with C language linkage.
llvm-svn: 172150
|
| |
|
|
|
|
|
|
|
|
|
|
| |
assertions.
To ensure that custom assertions/conditional would also be supported,
just check if the ivar that needs to be invalidated or set to nil is
compared against 0.
Unfortunately, this will not work for code containing 'assert(IvarName)'
llvm-svn: 172147
|
| |
|
|
|
|
|
|
|
|
| |
storage and thus is implicitly zero-initialized, no need to
do C++11 memory model. This patch unconditionally detects
such condition and zeroinitializer's the variable.
Patch has been commented on and OKed by Doug off-line.
// rdar://12897704
llvm-svn: 172144
|
| |
|
|
| |
llvm-svn: 172141
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Objective-C method declarations look like this:
- (returntype)name:(type)argname anothername:(type)arg2name;
In google style, there's no space after the leading '-' but one after
"(returntype)" instead (but none after the argument types), see
http://google-styleguide.googlecode.com/svn/trunk/objcguide.xml#Method_Declarations_and_Definitions
Not inserting the space after '-' is easy, but to insert the space after the
return type, the formatter needs to know that a closing parenthesis ends the
return type. To do this, I tweaked the code in parse() to check for this, which
in turn required moving detection of TT_ObjCMethodSpecifier from annotate() to
parse(), because parse() runs before annotate().
(To keep things interesting, the return type is optional, but it's almost
always there in practice.)
http://llvm-reviews.chandlerc.com/D280
llvm-svn: 172140
|
| |
|
|
|
|
|
|
| |
In some cases, we just pick any ivar that needs invalidation and attach
the warning to it. Picking the first from DenseMap of pointer keys was
triggering non-deterministic output.
llvm-svn: 172134
|
| |
|
|
|
|
|
|
|
| |
Truncation happens regularly when find_first_not_of returns npos,
strings long enough to trigger bug here are implausible.
No functionality change intended (ignoring absurd string lengths).
llvm-svn: 172127
|
| |
|
|
| |
llvm-svn: 172126
|
| |
|
|
|
|
| |
Part of rdar://12991541
llvm-svn: 172122
|
| |
|
|
|
|
|
| |
Decl is a VarDecl.
Part of rdar://12991541
llvm-svn: 172120
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
@property(assign, getter = isEditable) BOOL editable;
Now:
@property(assign, getter=isEditable) BOOL editable;
It'd be nice if some Apple person could let me know if spaces are preferred
around '=' in @synthesize lines (see FIXME in the test).
llvm-svn: 172110
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Restructured the checker so that it could easily find two new classes of
issues:
- when a class contains an invalidatable ivar, but no declaration of an
invalidation method
- when a class contains an invalidatable ivar, but no definition of an
invalidation method in the @implementation.
The second case might trigger some false positives, for example, when
the method is defined in a category.
llvm-svn: 172104
|
| |
|
|
| |
llvm-svn: 172103
|
| |
|
|
|
|
| |
// rdar://11577384
llvm-svn: 172102
|
| |
|
|
| |
llvm-svn: 172101
|
| |
|
|
|
|
| |
declarations.
llvm-svn: 172100
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Don't do this in Google style though:
http://google-styleguide.googlecode.com/svn/trunk/objcguide.xml#Protocols
Most other places (function declarations, variable declarations) still get
this wrong, and since this looks very similiar to template instantiations to
the lexer (`id <MyProtocol> a = ...`), it's going to be hard to fix in some
places.
llvm-svn: 172099
|
| |
|
|
|
|
|
| |
This is the last step of pure shuffling stuff around, the next step will
be the actual feature.
llvm-svn: 172098
|
| |
|
|
| |
llvm-svn: 172096
|
| |
|
|
|
|
|
|
|
|
| |
Before:
@ -4.5
Now:
@-4.5
llvm-svn: 172095
|
| |
|
|
| |
llvm-svn: 172094
|
| |
|
|
|
|
|
|
| |
The first token in @implementation, @interface, and @protocol lines is now
marked TT_ObjCDecl, and lines starting with a TT_ObjCDecl token are now marked
LT_ObjCMethodDecl.
llvm-svn: 172093
|
| |
|
|
|
|
|
| |
This is the next step towards being able to configure multiple unwrapped
lines into one.
llvm-svn: 172092
|
| |
|
|
|
|
|
| |
an objectiveC object, use objc_exception_throw
to raise the exception. // rdar://12605907
llvm-svn: 172091
|
| |
|
|
| |
llvm-svn: 172090
|
| |
|
|
|
|
|
|
|
| |
-provide a "raw_ostream'ish" class to make it convenient to output logging info.
-use macros to automate a bit the logging functionality inside libclang functions
-when logging, print a stack trace if "LIBCLANG_LOGGING=2" environment is set.
-add logging to more functions.
llvm-svn: 172089
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This will be a new style requirement going forwards: a diagnostic can only
use the implicit InGroup<DiagGroup<"foo">> syntax if "foo" is not used by
any other diagnostics; as soon as it is, it needs an explicit group.
This also brings some stray "conversion" diagnostics into the
"Value Conversion Issue" category, instead of the more generic
"Semantic Issue" category. I consider this an improvement!
- warn_impcast_complex_scalar
- warn_impcast_float_integer
- warn_impcast_float_precision
- warn_impcast_integer_precision
- warn_impcast_vector_scalar
llvm-svn: 172088
|
| |
|
|
|
|
|
|
|
|
|
| |
Not only is this inefficient for TableGen, it's annoying for maintenance
when renaming warning flags (unusual) or adding those flags to a group
(more likely).
This uses the new fix-it infrastructure for LLVM's SourceMgr/SMDiagnostic,
as well as a few changes to TableGen to track more source information.
llvm-svn: 172087
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This prepares the code for single line optimizations and changes the
dependencies between single-line-formats to the indent of the first
token.
Conceptually, the first token is "between" the lines anyway, as the
whitespace for the first token includes the previous end-of-line, which
needs to be escaped when inside a preprocessor directive.
llvm-svn: 172083
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We now decide whether a newline should go before the closing brace
depending on whether a newline was inserted after the opening brace.
For example, we now insert a newline before '};' in:
static SomeClass WithALoooooooooooooooooooongName = {
100000000, \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"
};
... while not inserting a newline here:
static SomeClass = { a, b, c, d, e, f, g, h, i, j,
looooooooooooooooooooooooooooooooooongname,
looooooooooooooooooooooooooooooong };
Also fixes the formating of (column limit 25):
int x = {
avariable,
b(alongervariable)
};
llvm-svn: 172076
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Uses DiagnosticsEngine to output diagnostics.
Reviewers: djasper, klimek
Reviewed By: djasper
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D278
llvm-svn: 172071
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We're now formatting (column limit 25):
int x = {
avariable,
b(alongervariable) };
This also fixes:
Aaa({
int i;
}, aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb,
ccccccccccccccccc));
... where we would previously break after the '},'.
Putting the closing curly into an extra line when there's a break
directly after the first curly will be done in a subsequent patch.
Paired with djasper.
llvm-svn: 172070
|
| |
|
|
|
|
|
| |
void f() {}
now gets formatted in one line.
llvm-svn: 172067
|