| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
llvm-svn: 209511
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
'optnone'.
This patch implements support for selectively disabling optimizations on a
range of function definitions through a pragma. The implementation is that
all function definitions in the range are decorated with attribute
'optnone'.
#pragma clang optimize off
// All function definitions in here are decorated with 'optnone'.
#pragma clang optimize on
// Compilation resumes as normal.
llvm-svn: 209510
|
| |
|
|
|
|
|
|
|
| |
Summary:
Previously, you could not specify the original file name when passing a preprocessed file into the compiler
Now you can use 'clang -Xclang -main-file-name -Xclang <original file name> ...'
Or 'clang -cc1 -main-file-name <original file name> ...'
llvm-svn: 209503
|
| |
|
|
|
|
|
|
|
|
| |
The last step of _mm_cvtps_pi16 should use _mm_packs_pi32, which is a function
that reads two __m64 values and packs four 32-bit values into four 16-bit
values.
<rdar://problem/16873717>
llvm-svn: 209489
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This was fairly broken. For example,
@__dso_handle would or would not get an unnamed_addr depending on how many
global destructors were used in a translation unit.
The consensus was that not every runtime variable is unnamed_addr and that
__dso_handle handle should not be, so just don't add unnamed_addr in
CreateRuntimeVariable.
llvm-svn: 209484
|
| |
|
|
|
|
| |
CXXRecordDecls when modules is enabled.
llvm-svn: 209482
|
| |
|
|
|
|
|
|
|
| |
Before -fstack-protector would always force a level of 1, even if the default
was 2.
Patch by Brad Smith.
llvm-svn: 209479
|
| |
|
|
| |
llvm-svn: 209477
|
| |
|
|
|
|
|
|
|
|
| |
Call it "libclang_rt.builtins-<arch>.a" to be consistent
with sanitizers/profile libraries naming. Modify Makefile
and CMake build systems and Clang driver accordingly.
Fixes PR19822.
llvm-svn: 209474
|
| |
|
|
|
|
|
|
|
| |
instantiated in another module, and the instantiation uses a partial
specialization, include the partial specialization and its template arguments
in the update record. We'll need them if someone imports the second module and
tries to instantiate a member of the template.
llvm-svn: 209472
|
| |
|
|
| |
llvm-svn: 209471
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The limits on the number of fix-it hints and ranges attached to a
diagnostic are arbitrary and don't apply universally to all users of the
DiagnosticsEngine. The way the limits are enforced may lead to diagnostics
generating invalid sets of fixes. I suggest removing the limits, which will also
simplify the implementation.
Reviewers: rsmith
Reviewed By: rsmith
Subscribers: klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D3879
llvm-svn: 209468
|
| |
|
|
| |
llvm-svn: 209466
|
| |
|
|
| |
llvm-svn: 209464
|
| |
|
|
| |
llvm-svn: 209449
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
And "none" pseudo-style indicating that formatting should be not
applied.
(1) Using .clang-format with "DisableFormat: true" effectively prevents
formatting for all files within the folder containing such .clang-format
file.
(2) Using -fallback-style=none together with -style=file prevents
formatting when .clang-format is not found, which can be used in on-save
callback.
Patch by Adam Strzelecki. Thank you!
llvm-svn: 209446
|
| |
|
|
|
|
| |
It just seems wrong. This fixes llvm.org/PR19736.
llvm-svn: 209440
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
template <int> struct A4 { A4() { }
};
After:
template <int i> struct A4 {
A4() {}
};
This fixes llvm.org/PR19813 (at least the part that isn't working as
intended).
llvm-svn: 209438
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This brings "-arch armv7m" (etc) behaviour more in line with what's expected
for developers on OS X, and allows Clang to find an "ld" (for example) in the
same directory instead of using the default /usr/bin/ld.
Unfortunately no test because it relies on the specific place Clang is running
from.
rdar://problem/16427320
llvm-svn: 209437
|
| |
|
|
|
|
| |
This reverts r209433. Sorry about that, it needs a test & better message.
llvm-svn: 209435
|
| |
|
|
|
|
|
|
| |
When "-arch armv7m" is specified, we want "aapcs", for example.
rdar://problem/16581138
llvm-svn: 209434
|
| |
|
|
| |
llvm-svn: 209433
|
| |
|
|
|
|
|
|
|
| |
Use stack protector strong by default to match the base OS and ports/packages
compiler policy.
Patch by Brad Smith.
llvm-svn: 209432
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
static_assert(std::is_integral<int> {} + 0, "");
int a = std::is_integral<int> {}
+ 0;
After:
static_assert(std::is_integral<int>{} + 0, "");
int a = std::is_integral<int>{} + 0;
llvm-svn: 209431
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
int foo(int i) {
return fo1 {}
(i);
}
int foo(int i) {
return fo1 {}
(i);
}
After:
int foo(int i) { return fo1{}(i); }
int foo(int i) { return fo1{}(i); }
This fixes llvm.org/PR19812.
llvm-svn: 209428
|
| |
|
|
|
|
|
|
|
|
|
| |
As the memory ownership is handled by the SpecificBumpPtrAllocator
anyway, there is no need to duplicate states when inserting them into
the Seen-set. This leads to an improvement of ~10% on the benchmark
formatting file.
No functional changes intended.
llvm-svn: 209422
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
var literal = 'hello ' + 'world';
After:
var literal = 'hello ' +
'world';
There is no reason to concatenated two string literals with a '+' unless
the line break is intended.
llvm-svn: 209413
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
int i{a *b};
After:
int i{a * b};
Also fix unrelated issue where braced init lists were counted as blocks
and prevented single-line functions.
llvm-svn: 209412
|
| |
|
|
|
|
|
|
|
|
| |
with llvm.mem.parallel_loop_access metadata.
It also adds a simple initial version of codegen for pragma omp simd (it will change in the future to support all the clauses).
Differential revision: http://reviews.llvm.org/D3644
llvm-svn: 209411
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If simple (one-statement) blocks can be inlined, the length needs to be
calculated correctly.
Before (in JavaScript but this also affects lambdas, etc.):
var x = {
valueOf: function() { return 1; }
};
After:
var x = {valueOf: function() { return 1; }};
llvm-svn: 209410
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ASTReaderListener's documentation states that visitInputFile will be
called based on the return values of needsInputFileVisitation and
needsSystemInputFileVisitation, but ChainedASTReaderListener may call
these methods on a child listener based on the values returned by the
other child.
Even worse, the calls to visitInputFile may be short-circuited due to
the use of the boolean or, so the calls to visit may not occur at all
for the second listener.
This updates ChainedASTReaderListener::visitInputFile to propagate the
ASTReaderListener behaviour to both children.
llvm-svn: 209394
|
| |
|
|
| |
llvm-svn: 209392
|
| |
|
|
| |
llvm-svn: 209389
|
| |
|
|
|
|
| |
comparison check to use this instead of calling Type::getCanonicalTypeInternal
llvm-svn: 209378
|
| |
|
|
|
|
|
|
|
|
|
| |
There are a couple of issues with writing VFS maps that are awkward to
fix within the current mutually recursive approach. Instead, replace
the algorithm with an iterative version that uses an explicit stack of
directories.
Includes tests for cases the old approach was tripping on.
llvm-svn: 209332
|
| |
|
|
| |
llvm-svn: 209322
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Naming the destructor using a typedef-name for the class-name is
well-formed.
This fixes PR19620.
Reviewers: rsmith, doug.gregor
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D3583
llvm-svn: 209319
|
| |
|
|
|
|
|
|
|
| |
Make better diagnostic produced by erroneous switch statement.
It fixes PR19022.
Differential Revision: http://reviews.llvm.org/D3137
llvm-svn: 209302
|
| |
|
|
|
|
|
| |
This is generally a good thing and in this case should also fix the
BUILD_SHARED_LIBS=ON build (see pr19774).
llvm-svn: 209300
|
| |
|
|
|
|
|
|
|
|
|
| |
On test files I ran this on, memory consumption overall went down from
2.5G to 2G, without performance regressions.
I also investigated making DynTypedNode by itself smaller (by pulling
out pointers for everything that doesn't fit in 8 bytes). This led to
another 200-300MB saved, but also introduced a significant regression in
performance due to the memory management overhead.
llvm-svn: 209297
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
var object_literal_with_long_name = {
a: 'aaaaaaaaaaaaaaaaaa', b: 'bbbbbbbbbbbbbbbbbb'
};
After:
var object_literal_with_long_name = {
a: 'aaaaaaaaaaaaaaaaaa',
b: 'bbbbbbbbbbbbbbbbbb'
};
llvm-svn: 209296
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
In:
struct A {
A()
noexcept(....) {}
};
'A()' is not a macro call.
This fixes llvm.org/PR19814.
llvm-svn: 209294
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
goog.array.forEach(array, function() {
doSomething();
doSomething();
},
this);
After:
goog.array.forEach(array, function() {
doSomething();
doSomething();
}, this);
llvm-svn: 209291
|
| |
|
|
| |
llvm-svn: 209289
|
| |
|
|
| |
llvm-svn: 209285
|
| |
|
|
|
|
|
|
|
| |
Also flesh out missing tests, improve diagnostic QOI and fix a couple of corner
cases found in the process.
Fixes PR10606.
llvm-svn: 209276
|
| |
|
|
| |
llvm-svn: 209275
|
| |
|
|
| |
llvm-svn: 209272
|
| |
|
|
|
|
|
|
|
|
|
| |
Eliminate createMainFileID() / createMainFileIDForMemBuffer() utility
functions. These didn't add much convenience and conflated two distinct
operations.
This change makes things easier to follow by providing a consistent interface
and getting rid of a bunch of cast-to-voids.
llvm-svn: 209266
|
| |
|
|
|
|
|
|
| |
the return type is already that.
rdar://16961577
llvm-svn: 209264
|