| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
defined for a class.
llvm-svn: 186128
|
|
|
|
|
|
|
|
|
|
|
| |
Various pieces of code, like base initialization in Sema and RTTI IRGen,
don't properly ignore qualifiers on base classes. Instead of auditing the
whole codebase, just strip them off in the getter. (The type as written is
still available in the TypeSourceInfo for code that cares.)
Fixes PR16596.
llvm-svn: 186125
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
int i; // indented 2 space more than clang-format would use.
SomeReturnType // clang-format invoked on this line.
SomeFunctionMakingLBraceEndInColumn80() {
} // This is the indent clang-format would prefer.
After:
int i; // indented 2 space more than clang-format would use.
SomeReturnType // clang-format invoked on this line.
SomeFunctionMakingLBraceEndInColumn80() {
}
llvm-svn: 186120
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(if they are not function-like).
Before:
SomeFunction(aaaaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaaaa)
OVERRIDE;
After:
SomeFunction(aaaaaaaaaaaaaaaaaaaaaa,
aaaaaaaaaaaaaaaaaaaaaaaa) OVERRIDE;
llvm-svn: 186117
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This puts a slight penalty on the linebreak before the first "<<", so
that clang-format generally tries to keep things on the first line.
User feedback has shown that this is generally desirable.
Before:
llvm::outs()
<< "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa =" << aaaaaaaaaaaaaaaaaaaaaaaaaaa;
After:
llvm::outs() << "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ="
<< aaaaaaaaaaaaaaaaaaaaaaaaaaa;
llvm-svn: 186115
|
|
|
|
|
|
|
| |
certain familiy of methods have the wrong type.
// rdar://14408244
llvm-svn: 186111
|
|
|
|
| |
llvm-svn: 186106
|
|
|
|
|
|
|
|
| |
result type, a diagnostic being issued, issue a 'note'
mentioning reason behind the unexpected warning.
// rdar://14121570.
llvm-svn: 186105
|
|
|
|
|
|
|
|
|
|
|
|
| |
Trailing return types can only occur in declaration contexts.
Before:
void f() { auto a = b -> c(); }
After:
void f() { auto a = b->c(); }
llvm-svn: 186087
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
SomeObject
// Calling someFunction on SomeObject
.someFunction();
After:
SomeObject
// Calling someFunction on SomeObject
.someFunction();
llvm-svn: 186085
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
bool aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa GUARDED_BY(
aaaaaaaaaaaa);
After:
bool aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
GUARDED_BY(aaaaaaaaaaaa);
llvm-svn: 186077
|
|
|
|
|
|
|
|
|
| |
followed by an identifier, then diagnose an identifier as being a bogus part of
the declarator instead of tripping over it. Improves diagnostics for cases like
std::vector<const int *p> my_vec;
llvm-svn: 186061
|
|
|
|
|
|
|
|
|
| |
* More \brief additions/fixes;
* Fix some misleading comments about C++11's explicit conversion operators;
* Mark up some \code examples;
* Add \file documentation.
llvm-svn: 186059
|
|
|
|
|
|
|
|
|
| |
* Fixing up \brief summaries (adding some, making some briefer);
* Standardizing on \commands, not @commands;
* Update C++0x references to C++11;
* Fix typos and Doxygen warnings.
llvm-svn: 186056
|
|
|
|
| |
llvm-svn: 186055
|
|
|
|
|
|
| |
Sorry about that.
llvm-svn: 186054
|
|
|
|
|
|
|
|
|
|
|
| |
& operator (ignoring any overloaded operator& for the type). The purpose of
this builtin is for use in std::addressof, to allow it to be made constexpr;
the existing implementation technique (reinterpret_cast to some reference type,
take address, reinterpert_cast back) does not permit this because
reinterpret_cast between reference types is not permitted in a constant
expression in C++11 onwards.
llvm-svn: 186053
|
|
|
|
|
|
| |
__builtin_addressof.
llvm-svn: 186052
|
|
|
|
|
|
| |
Also fixes a couple minor bugs along the way; see testcases.
llvm-svn: 186049
|
|
|
|
| |
llvm-svn: 186048
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
#if defined(__has_foo("X")) && __has_foo("X")
is not a correct way to portably use __has_foo, because it is expanded to
#if 0 && 0("X")
... which is ill-formed.
Also add a missing ')'.
llvm-svn: 186047
|
|
|
|
|
|
|
|
|
| |
lookup in the surrounding context. Slightly rework how we handle friend
declarations to inherit the visibility of the prior declaration, rather
than setting a friend declaration to be visible whenever there was a prior
declaration.
llvm-svn: 186040
|
|
|
|
|
|
|
|
|
|
|
|
| |
migrate to 'copy attribute if Object
class implements NSCopying otherwise
assume implied 'strong'. Remove
lifetime qualifier on property as it has
moved to property's attribute. Added TODO
comment for future work by poking into
setter implementation.
llvm-svn: 186037
|
|
|
|
|
|
| |
the two sets of debug scope and cleanup scope.
llvm-svn: 186030
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, we asserted that whenever 'new' did not include a constructor
call, the type must be a non-record type. In C++11, however, uniform
initialization syntax (braces) allow 'new' to construct records with
list-initialization: "new Point{1, 2}".
Removing this assertion should be perfectly safe; the code here matches
what VisitDeclStmt does for regions allocated on the stack.
<rdar://problem/14403437>
llvm-svn: 186028
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
use/maintain additional state from the LambdaExpr while visiting the body
of a LambdaExpr.
One use for this arises because Clang's AST currently holds lambda bodies
in a form prior to their adjustment to refer to captured copies of local
variables, and so some clients will need access to the lambda's closure
type in order to query how to map VarDecl*s to the FieldDecls of their
by-copy captures. This hook is sufficient for at least one such client;
to do this without such a hook would require the client to re-implement
the whole of TraverseLambdaExpr, which is non-trivial and would likely be
more brittle.
llvm-svn: 186024
|
|
|
|
|
|
| |
Patch courtesy of Luke Zarko <zarko@google.com>
llvm-svn: 186019
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is not activated for any style, might change or go away
completely.
For those that want to play around with it, set
ExperimentalAutoDetectBinPacking to true.
clang-format will then:
Look at whether function calls/declarations/definitions are currently
formatted with one parameter per line (on a case-by-case basis). If so,
clang-format will avoid bin-packing the parameters. If all parameters
are on one line (thus that line is "inconclusive"), clang-format will
make the choice dependent on whether there are other bin-packed
calls/declarations in the same file.
The reason for this change is that bin-packing in some situations can be
really bad and an author might opt to put one parameter on each line. If
the author does that, he might want clang-format not to mess with that.
If the author is unhappy with the one-per-line formatting, clang-format
can easily be convinced to bin-pack by putting any two parameters on the
same line.
llvm-svn: 186003
|
|
|
|
| |
llvm-svn: 185997
|
|
|
|
|
|
|
| |
Specifically, handle the case where the block is in a default argument
in a class method. The mangling here follows what we do for lambdas.
llvm-svn: 185991
|
|
|
|
| |
llvm-svn: 185989
|
|
|
|
|
|
|
|
|
|
|
|
| |
Compute mangling numbers for externally visible local variables and tags.
Change the mangler to consistently use discriminators where necessary.
Tweak the scheme we use to number decls which are not externally visible
to avoid unnecessary discriminators in common cases now that we request
them more consistently.
Fixes <rdar://problem/14204721>.
llvm-svn: 185986
|
|
|
|
|
|
|
| |
attributes in migration. Specialli use of
'copy' attribute for retainable object types.
llvm-svn: 185985
|
|
|
|
|
|
| |
Differential Revision: http://llvm-reviews.chandlerc.com/D1095
llvm-svn: 185979
|
|
|
|
|
|
|
|
|
| |
method declaration into its implementation to
prevent a bogus warning about mismatched attributes.
then make sure the warning about missing call to super comes out
of the method implementation. // rdar://14251387
llvm-svn: 185974
|
|
|
|
|
|
|
|
|
|
|
| |
Do not generate VLAs as complex variables any more, as they are now
correctly represented as breg+0 locations in the backend.
(Paired commit with LLVM: r185966)
rdar://problem/13658587
llvm-svn: 185967
|
|
|
|
|
|
|
| |
migration. Also, fixes an old bug where older migration
flags were not being checked for properly.
llvm-svn: 185948
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes llvm.org/PR15170.
For now, the basic formatting rules are (based on the C++11 standard):
* Surround the "->" with spaces.
* Break before "->".
Also fix typo.
llvm-svn: 185938
|
|
|
|
|
|
|
|
| |
Sema::ActOnDocumentableDecls.
Patch by Robert Wilhelm.
llvm-svn: 185931
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Basically treat a function with a trailing call similar to a function
with multiple parameters.
Before:
aaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
aaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaa))
.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa();
After:
aaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
aaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaa))
.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa();
Also fix typo.
llvm-svn: 185930
|
|
|
|
|
|
| |
include_directories(SYSTEM).
llvm-svn: 185928
|
|
|
|
|
|
|
|
|
| |
-Wdocumentation.
-Wdocumentation won't seek -isystem. LIBXML2's headers in a certain distro might be incompatible to -Wdocumentation.
FIXME: Could autoconf detect clang or availability of -isystem?
llvm-svn: 185927
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
someFunction(OtherParam, BracedList{
// comment 1 (Forcing intersting break)
param1, param2,
// comment 2
param3, param4
});
After:
someFunction(OtherParam, BracedList{
// comment 1 (Forcing intersting break)
param1, param2,
// comment 2
param3, param4
});
To do so, the UnwrappedLineParser now stores the information about the
kind of brace in the FormatToken.
llvm-svn: 185914
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes llvm.org/PR16328 (at least partially).
Before:
SomeLoooooooooooooooooooooooooooooogType operator<<(
const SomeLooooooooogType &a, const SomeLooooooooogType &b);
After:
SomeLoooooooooooooooooooooooooooooogType
operator<<(const SomeLooooooooogType &a, const SomeLooooooooogType &b);
llvm-svn: 185908
|
|
|
|
|
|
|
|
|
|
|
| |
std::list.
list is the name of a class, not a namespace. Change the test as well - the previous
version did not test properly.
Fixes radar://14317928.
llvm-svn: 185898
|
|
|
|
|
|
| |
<rdar://problem/14354144>
llvm-svn: 185897
|
|
|
|
|
|
| |
Austin Seipp!
llvm-svn: 185896
|
|
|
|
|
|
|
| |
with identifier info. This covers most identifier-like entities (other than
the ISO646 keywords).
llvm-svn: 185895
|
|
|
|
|
|
| |
PR16561.
llvm-svn: 185887
|
|
|
|
|
|
| |
properties.
llvm-svn: 185884
|