| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
| |
- includes header/footer as required by MELPA
- correctly handles buffers that are not associated with a file
- displays stderr and exit code of clang-format process
- customizable via the emacs customization interface and file-/directory-
local variables
Patch by Johann Klähn.
llvm-svn: 225447
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This makes piped output easier to read in many instances.
Before:
llvm::errs() << aaaa << std::endl << bbbb << std::endl;
After:
llvm::errs() << aaaa << std::endl
<< bbbb << std::endl;
Also fix a few instance of "don't use else after return" as per the
coding standards.
llvm-svn: 225444
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If there are some non-ascii character in the input source code, the
column index might be smallar than the byte index. This will result
in two possible assertion failures. This CL fixes the computation of
the column index and byte index.
1. The assertion in startOfNextColumn() and startOfPreviousColumn()
should not be raised when the byte index is greater than the column
index since the non-ascii characters may use more than one bytes to
store a character in a column.
2. The length of the caret line should be equal to the number of columns
of source line, instead of the length of the source line. Otherwise,
the assertion in selectInterestingSourceRegion will be raised because
the removed columns plus the kept columns are not greater than the max
column, which means that we should not remove any column at all.
llvm-svn: 225442
|
| |
|
|
|
|
|
|
|
|
| |
Before:
struct A < std::enable_if<sizeof(T2) <sizeof(int32)>::type>;
After:
struct A<std::enable_if<sizeof(T2) < sizeof(int32)>::type>;
llvm-svn: 225435
|
| |
|
|
| |
llvm-svn: 225426
|
| |
|
|
|
|
| |
unprintable characters. Fixes PR22048.
llvm-svn: 225423
|
| |
|
|
| |
llvm-svn: 225414
|
| |
|
|
|
|
|
|
|
| |
I keep forgetting the exact spelling of -macosx-version-min=, and now I can
run `bin/clang --help | grep version -A 2` to remind myself. While here,
also document -mios-version-min=. Don't document -mios-simulator-version-min=
as it's just an alias for -mios-version-min= these days.
llvm-svn: 225409
|
| |
|
|
|
|
|
|
|
|
|
|
| |
transform.
Also diagnose typos in the initializer of an invalid C++ declaration.
Both issues were hit using the same line of test code, depending on
whether the code was treated as C or C++.
Fixes PR22092.
llvm-svn: 225389
|
| |
|
|
|
|
|
|
| |
Shorter and doesn't need -O2 -- but still suboptimal as it's still doing
-emit-obj. dblaikie says he'll improve this when he'll reland his change
with a fix.
llvm-svn: 225364
|
| |
|
|
|
|
|
|
|
|
|
| |
r225141 changed the defaults of AllowShortIfStatementsOnASingleLine and
AlignTrailingComments for Google style and added explicit overrides for
Chromium style to undo these changes. For AllowShortIfStatementsOnASingleLine
that's good as the Android style guide (which Chromium uses for Java) explicitly
permits single-line ifs. But it's silent on trailing comments, to it makes
sense for Chromium style to just follow Google style.
llvm-svn: 225363
|
| |
|
|
|
|
|
|
| |
PR22096 has several test cases that assert that look fairly different. I'm
adding one of those as an automated test, but when relanding the other cases
should probably be checked as well.
llvm-svn: 225361
|
| |
|
|
|
|
| |
This corrects a bug I introduced in r224781.
llvm-svn: 225359
|
| |
|
|
|
|
|
|
|
|
|
| |
This prevents clang-format from moving/aligning the comment in the
snippet:
void f() {
int i; // some comment
// some unrelated comment
}
llvm-svn: 225352
|
| |
|
|
|
|
|
|
|
|
| |
Before:
** outparam = 1;
After:
**outparam = 1;
llvm-svn: 225349
|
| |
|
|
| |
llvm-svn: 225340
|
| |
|
|
| |
llvm-svn: 225324
|
| |
|
|
|
|
|
| |
This makes the output of FileCheck way easier to read since this test hits
many warnings.
llvm-svn: 225322
|
| |
|
|
| |
llvm-svn: 225314
|
| |
|
|
|
|
|
| |
In r225106, support for the CMPB instruction was added to the PowerPC backend.
This adds the associated GCC-compatible feature flag.
llvm-svn: 225312
|
| |
|
|
| |
llvm-svn: 225303
|
| |
|
|
|
|
| |
For now there is no difference between amdgcn and r600.
llvm-svn: 225294
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
MSVC doesn't like the instantiation of the structure in the initializer list.
Initialize it in the constructor body to repair the build.
TargetInfo.h(545) : error C2143: syntax error : missing ')' before '{'
TargetInfo.h(545) : error C2143: syntax error : missing ';' before '}'
TargetInfo.h(545) : error C2059: syntax error : ')'
TargetInfo.h(545) : error C2059: syntax error : ','
TargetInfo.h(547) : error C2143: syntax error : missing ';' before '{'
TargetInfo.h(547) : error C2447: '{' : missing function header (old-style formal list?)
llvm-svn: 225247
|
| |
|
|
|
|
|
|
|
|
| |
Add additional constraint checking for target specific behaviour for inline
assembly constraints. We would previously silently let all arguments through
for these constraints. In cases where the constraints were violated, we could
end up failing to select instructions and triggering assertions or worse,
silently ignoring instructions.
llvm-svn: 225244
|
| |
|
|
| |
llvm-svn: 225241
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Allow -fsanitize-coverage=N with ubsan, clang part.
This simply allows the flag combination.
The LLVM will work out of the box, the compile-rt part
will follow as a separate patch.
Test Plan: check-clang
Reviewers: samsonov
Reviewed By: samsonov
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D6849
llvm-svn: 225229
|
| |
|
|
|
|
|
|
|
| |
This reverts commit r225212. It's failing on multiple buildbots [1][2].
[1]: http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/22032
[2]: http://lab.llvm.org:8080/green/view/Clang/job/clang-stage1-cmake-RA-incremental_check/2357/
llvm-svn: 225221
|
| |
|
|
| |
llvm-svn: 225212
|
| |
|
|
| |
llvm-svn: 225196
|
| |
|
|
|
|
|
| |
The first function is named __cxx_global_var_init, which is a substring of
the following functions @__cxx_global_var_init(1,2,3,etc).
llvm-svn: 225191
|
| |
|
|
|
|
| |
This makes it a lot easier to read the output from FileCheck when it fails.
llvm-svn: 225190
|
| |
|
|
|
|
| |
For some regression tests the path to the right toolchain is specified using the -sysroot switch. However, if clang was configured with a custom gcc toolchain (either by using GCC_INSTALL_PREFIX in cmake or the equivalent configure command), the path to the custom gcc toolchain path takes precedence to the one specified by sysroot. This causes several regression tests to fail as they will be using an unexpected path. This patch fixes this issue by adding --gcc-toolchain='' to all tests that rely on that. The empty string causes the driver to pick the path from sysroot instead.
llvm-svn: 225182
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Replace usage of StringRef with std::string in AST_MATCHER* generated
matchers to make sure they keep their own copy of the string.
The value could be a temporary and it causes the pointer to be dangling
by the time the matcher is executed.
Reviewers: klimek
Subscribers: klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D6843
llvm-svn: 225180
|
| |
|
|
|
|
| |
plugins tests might fail.
llvm-svn: 225170
|
| |
|
|
| |
llvm-svn: 225168
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
After:
return (a instanceof List<?>) ? aaaaaaaaaaaaaaaaaaaaaaa(
aaaaaaaaaaaaaaaaaaaaa)
: aaaaaaaaaaaaaaaaaaaaaaa;
After:
return (a instanceof List<?>)
? aaaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaa)
: aaaaaaaaaaaaaaaaaaaaaaa;
llvm-svn: 225161
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
someFunction(new Runnable() { public void run() { System.out.println(42);
}
});
After:
someFunction(new Runnable() {
public void run() {
System.out.println(42);
}
});
llvm-svn: 225142
|
| |
|
|
|
|
| |
No tests added as all of these are already tested separately.
llvm-svn: 225141
|
| |
|
|
|
|
|
|
|
|
| |
r185773 added an assert that checked that a CXXUnresolvedConstructExpr either
has a valid rparen, or exactly one argument. This doesn't have to be true for
invalid inputs. Convert the assert to an if, and add a test for this case.
Found by SLi's afl bot.
llvm-svn: 225140
|
| |
|
|
|
|
| |
This applies to mingw as clang-cl already has its own logic for the filename.
llvm-svn: 225134
|
| |
|
|
|
|
| |
This was broken by r224120.
llvm-svn: 225130
|
| |
|
|
| |
llvm-svn: 225129
|
| |
|
|
| |
llvm-svn: 225128
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Also add a few asserts for this. The existing code assumes this in a bunch
of places already (see e.g. the assert at the top of ParseTypedefDecl(), and
there are many unchecked calls on the result of GetTypeForDeclarator()), and
from looking through the code this should always be true from what I can tell.
This allows removing ASTContext::getNullTypeSourceInfo() too as that's now
unused.
No behavior change intended.
llvm-svn: 225125
|
| |
|
|
|
|
|
|
|
|
| |
Many places in Sema cannot handle isNull() types. This is fine, because in
most places the type building code recovers by falling back to IntTy. In
GetFullTypeForDeclarator(), this is done at the end of the getNumTypeObjects()
loop body. This function calls BuildQualifiedType() before this fallback is
done though, so it explicitly needs to check for isNull() types.
llvm-svn: 225124
|
| |
|
|
| |
llvm-svn: 225122
|
| |
|
|
|
|
| |
It's reasonable to ask if an l-value with class type is modifiable.
llvm-svn: 225121
|
| |
|
|
|
|
|
| |
Weird constructs like __attribute__((inline)) or
__attibute__((typename)) should result in warnings, not errors.
llvm-svn: 225118
|
| |
|
|
|
|
|
|
|
|
|
| |
access through a volatile-qualified type, we're not certain of the underlying object's side-effects on access.
Treat volatile accesses as "maybe" instead of "definite" side effects for the purposes of warning on evaluations in an unevaluated context. No longer diagnose on idiomatic code like:
int * volatile v;
(void)sizeof(*v);
llvm-svn: 225116
|
| |
|
|
|
|
|
| |
It is not needed since we FileCheck for the warning and -Werror itself can end up
unused.
llvm-svn: 225102
|