CMake gets confused by the fact that both LLVM and Clang now have
a CodeGen unittest. Rename the target to avoid that. The new test
was also missing ProfileData (thanks to Julien Lerouge for
pointing that out)
llvm-svn: 216499
Summary: When the main file is created from a membuffer, there is no file entry that can be retrieved. This uses "__GLOBAL_I_a" in that case which is what was always used before r208128.
Reviewers: majnemer, thakis
Reviewed By: thakis
Subscribers: yaron.keren, rsmith, cfe-commits
Differential Revision: http://reviews.llvm.org/D5043
llvm-svn: 216495
Error caught using -fsanitize=pointer-overflow.
Expand ASTVectorTest to verify basic behavior,
test fails without functionality in this patch.
llvm-svn: 216385
Before:
template <class T>
T *f(T &c) // Problem here: no line break before f
{
return NULL;
}
After:
template <class T>
T *
f(T &c)
{
return NULL;
}
Patch by Marek Kurdej, thank you!
llvm-svn: 215633
Summary:
This includes:
- Passing a Sema to completeExpression to allow for named values in the
expression.
- Passing a map of names to values to the parser.
- Update the Sema interface to include completion for matchers.
- Change the parser to use the Sema for completion, instead of going
directly to Registry.
Reviewers: pcc
Subscribers: klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D3509
llvm-svn: 215472
And in the process, discover that FileManager::removeStatCache had a
double-delete when removing an element from the middle of the list (at
the beginning or the end of the list, there was no problem) and add a
unit test to exercise the code path (which successfully crashed when run
(with modifications to match the old API) without this patch applied)
llvm-svn: 215388
Summary:
http://llvm.org/bugs/show_bug.cgi?id=20587
Added K&R style. It could be enabled by the following option:
```
BreakBeforeBraces: KernighanRitchie
```
This style is like `Attach`, but break *only* before function
declarations.
As I can see, no additional logic required to support this style, any
style different from other styles automagically satisfies K&R.
Reviewers: djasper
Reviewed By: djasper
Subscribers: cfe-commits, klimek
Differential Revision: http://reviews.llvm.org/D4837
llvm-svn: 215354
After post-commit review and community discussion, this seems like a
reasonable direction to continue, making ownership semantics explicit in
the source using the type system.
llvm-svn: 215323
This allows using EndOfMainFile from a PPCallback to access data from the
action. The pattern of PPCallback referencing an action is common in clang-tidy.
Differential Revision: http://reviews.llvm.org/D4773
llvm-svn: 215145
Before:
auto f (int x) -> decltype(x) { return sizeof(x); }
int g () noexcept(someCall ());
static_assert(sizeof(char) == 1, "Your compiler is broken");
After:
auto f (int x) -> decltype (x) { return sizeof (x); }
int g () noexcept (someCall ());
static_assert (sizeof (char) == 1, "Your compiler is broken");
This fixes llvm.org/PR20559.
Patch by Roman Kashitsyn, thank you!
llvm-svn: 214969
With this patch:
int ThisWillBeFormatted;
// clang-format off
int ThisWontBeFormatted;
// clang-format on
int Formatted;
This is for regions where a significantly nicer code layout can be found
knowing the content of the code.
This fixes llvm.org/PR20463.
llvm-svn: 214966
Before:
auto aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa =
new (aaaaaaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaa))
typename aaaaaaaaaaaaaaaaaaaaaaaa();
After:
auto aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa =
new (aaaaaaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaa))
typename aaaaaaaaaaaaaaaaaaaaaaaa();
llvm-svn: 214964
This is required for GNU coding style, among others.
Also update the configuration documentation.
Modified from an original patch by Jarkko Hietaniemi, thank you!
llvm-svn: 214858