| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
use clang's formatter. Currently, formatter is used
to format declaration tags for xml comments. Since formatter
is in flux and its change will break several of the clang comment
tests, only a single tests is formatted using this facility.
Doug has reviewed and approved it for check-in.
llvm-svn: 170467
|
| |
|
|
|
|
| |
needs to be robust
llvm-svn: 170466
|
| |
|
|
| |
llvm-svn: 170461
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We used to format initializers like this (with a sort of hacky implementation):
Constructor()
: Val1(A),
Val2(B) {
and now format like this (with a somewhat better solution):
Constructor()
: Val1(A), Val2(B) {
assuming this would not fit on a single line. Also added tests.
As a side effect we now first analyze whether an UnwrappedLine needs to be
split at all. If not, not splitting it is the best solution by definition. As
this should be a very common case in normal code, not exploring the entire
solution space can provide significant speedup.
llvm-svn: 170457
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PR 14529 was opened because neither Clang or LLVM was expanding
calls to creal* or cimag* into instructions that just load the
respective complex field. After some discussion, it was not
considered realistic to do this in LLVM because of the platform
specific way complex types are expanded. Thus a way to solve
this in Clang was pursued. GCC does a similar expansion.
This patch adds the feature to Clang by making the creal* and
cimag* functions library builtins and modifying the builtin code
generator to look for the new builtin types.
llvm-svn: 170455
|
| |
|
|
| |
llvm-svn: 170440
|
| |
|
|
|
|
| |
Add OpenCL images as clang builtin types.
llvm-svn: 170432
|
| |
|
|
|
|
| |
these files to Windows style.
llvm-svn: 170431
|
| |
|
|
| |
llvm-svn: 170428
|
| |
|
|
| |
llvm-svn: 170425
|
| |
|
|
| |
llvm-svn: 170408
|
| |
|
|
|
|
|
|
| |
This fixes the storage class of extern decls that are merged with file level
statics. The patch also fixes the linkage computation so that they are
considered internal.
llvm-svn: 170406
|
| |
|
|
| |
llvm-svn: 170403
|
| |
|
|
|
|
|
|
| |
(This change only affects ObjC.)
<rdar://problem/12857117>.
llvm-svn: 170402
|
| |
|
|
|
|
| |
missing 'void', insert a fixit to add the void.
llvm-svn: 170399
|
| |
|
|
|
|
|
|
| |
diagnostic ranges).
I'm not really happy with this fix, but I'm confident it's correct.
llvm-svn: 170397
|
| |
|
|
|
|
|
|
| |
for location information.
Part of PR14624
llvm-svn: 170391
|
| |
|
|
|
|
| |
to an object outside its lifetime does not have undefined behavior.
llvm-svn: 170387
|
| |
|
|
|
|
|
|
| |
An extern declaration following a tentative definition should not itself be
considered a tentative definition.
Fixes pr14614.
llvm-svn: 170377
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This also requires adding support to -cc1as for passing the detecting
PWD down through LLVM's debug info (which in turn required the LLVM
change in r170371).
The test case is weak (we only test the driver behavior) because there
is currently to infrastructure for running cc1as in the test suite. So
those four lines are untested (much like all other lines in that file),
but we have a test for the same pattern using llvm-mc in the LLVM
repository.
llvm-svn: 170373
|
| |
|
|
|
|
| |
of the include guards.
llvm-svn: 170364
|
| |
|
|
| |
llvm-svn: 170363
|
| |
|
|
| |
llvm-svn: 170362
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
performance heuristic
After inlining a function with more than 13 basic blocks 32 times, we
are not going to inline it anymore. The idea is that inlining large
functions leads to drastic performance implications. Since the function
has already been inlined, we know that we've analyzed it in many
contexts.
The following metrics are used:
- Large function is a function with more than 13 basic blocks (we
should switch to another metric, like cyclomatic complexity)
- We consider that we've inlined a function many times if it's been
inlined 32 times. This number is configurable with -analyzer-config
max-times-inline-large=xx
This heuristic addresses a performance regression introduced with
inlining on one benchmark. The analyzer on this benchmark became 60
times slower with inlining turned on. The heuristic allows us to analyze
it in 24% of the time. The performance improvements on the other
benchmarks I've tested with are much lower - under 10%, which is
expected.
llvm-svn: 170361
|
| |
|
|
| |
llvm-svn: 170354
|
| |
|
|
|
|
| |
This reverts commit r170344. Doesn't even compile.
llvm-svn: 170351
|
| |
|
|
| |
llvm-svn: 170344
|
| |
|
|
|
|
|
|
|
|
|
|
| |
avoided.
This required a minor modification of the memoization as now the
"CurrentPenalty" depends on whether or not we break before the current
token. Therefore, the CurrentPenalty should not be memoized but added
after retrieving a value from memory. This should not affect the runtime
behavior.
llvm-svn: 170337
|
| |
|
|
|
|
|
|
|
| |
More specifically:
- Improve formatting of static initializers.
- Fix formatting of lines comments in enums.
- Fix formmating of trailing line comments.
llvm-svn: 170316
|
| |
|
|
| |
llvm-svn: 170314
|
| |
|
|
|
|
|
|
|
|
| |
incompatibility with how complex values are returned. It is sufficient
to flag all complex types as direct rather than indirect.
A new test case is provided that checks correct IR generation for the
various supported flavors of _Complex.
llvm-svn: 170302
|
| |
|
|
| |
llvm-svn: 170297
|
| |
|
|
|
|
| |
end of the cache. Fixes PR14570.
llvm-svn: 170281
|
| |
|
|
|
|
|
| |
Results in better block placement that helps close the
performance gap when making ubsan checks recoverable.
llvm-svn: 170263
|
| |
|
|
| |
llvm-svn: 170238
|
| |
|
|
|
|
| |
CXXDeleteExpr
llvm-svn: 170234
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
of a member function with parenthesized declarator.
Like this test case:
class Foo {
const char *(baz)() {
return __PRETTY_FUNCTION__;
}
};
llvm-svn: 170233
|
| |
|
|
|
|
|
| |
Fixes a bug, where we were dropping the state modifications from the
checkBranchCondition checker callback.
llvm-svn: 170232
|
| |
|
|
| |
llvm-svn: 170231
|
| |
|
|
|
|
|
|
|
|
|
|
| |
- Renaming GetCompilations() and GetSourcePathList() to follow LLVM
style.
- Updating docs to reflect name change.
- Also updating help text to not mention clang-check since this class
can be used by any tool.
Reviewed By: Alexander Kornienko
llvm-svn: 170229
|
| |
|
|
|
|
| |
a note about where the macro is defined.
llvm-svn: 170228
|
| |
|
|
|
|
|
|
| |
C++11 allowed writing "vector<vector<int>>" without a space between the two ">".
This change allows this for protocols in template lists too in -std=c++11 mode,
and improves the diagnostic in c++98 mode.
llvm-svn: 170223
|
| |
|
|
|
|
| |
version of cygwin/w32api.
llvm-svn: 170188
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes the missing warning here:
struct S {
template <typename T>
void meth() {
char arr[3];
arr[4] = 0; // warning: array index 4 is past the end of the array
}
};
template <typename T>
void func() {
char arr[3];
arr[4] = 0; // no warning
}
llvm-svn: 170180
|
| |
|
|
|
|
| |
Sema::ActOnStartOfFunctionDef is already doing.
llvm-svn: 170179
|
| |
|
|
| |
llvm-svn: 170176
|
| |
|
|
| |
llvm-svn: 170170
|
| |
|
|
|
|
| |
report on IRC>
llvm-svn: 170160
|
| |
|
|
|
|
|
|
|
|
|
|
| |
I wasn't sure where to put the test case for this, but this seemed like as good
a place as any. I had to reorder the tests here to make them legible while
still matching the order of metadata output in the IR file (for some reason
making it virtual changed the ordering).
Relevant commit to fix up LLVM to actually respect 'artificial' member
variables is coming once I write up a test case for it.
llvm-svn: 170154
|
| |
|
|
|
|
|
|
|
|
|
|
| |
don't crash when loading a PCH with the older format.
The introduction of the control block broke compatibility with PCHs from
older versions. This patch allows loading (and rejecting) PCHs from an older
version and allows newer PCHs to be rejected from older clang versions as well.
rdar://12821386
llvm-svn: 170150
|