| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
No functionality change. This is just an intermediate patch for changing those
global variables to use private linkage.
llvm-svn: 202409
|
| |
|
|
| |
llvm-svn: 202360
|
| |
|
|
|
|
| |
statements preceded by 'noreturn' functions.
llvm-svn: 202352
|
| |
|
|
|
|
| |
They are covered by -Wcovered-switch-default.
llvm-svn: 202349
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ASTUnit::getMainBufferWithPrecompiledPreamble().
With r197755 we started reading the contents of buffer file entries, but the
buffers may point to ASTReader blobs that have been disposed.
Fix this by having the CompilerInstance object keep a reference to the ASTReader
as well as having the ASTContext keep reference to the ExternalASTSource.
This was very difficult to construct a test case for.
rdar://16149782
llvm-svn: 202346
|
| |
|
|
|
|
| |
crasher, PR18983.
llvm-svn: 202340
|
| |
|
|
|
|
|
| |
generation purposes.
Paired with a commit to llvm.
llvm-svn: 202334
|
| |
|
|
|
|
|
|
|
|
|
| |
hierarchies (PR18967)
Erroring out until we fix the bug means we don't have to keep chasing down
this same miscompile in a bunch of different places.
Differential Revision: http://llvm-reviews.chandlerc.com/D2890
llvm-svn: 202331
|
| |
|
|
| |
llvm-svn: 202330
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When true, sets the name of the file to be the name from
'external-contents'. Otherwise, you get the virtual path that the file
was looked up by. This will not affect any non-virtual paths, or fully
virtual paths (for which there is no reasonable 'external' name anyway).
The setting is available globally, but can be overriden on a per-file
basis.
The goal is that this setting will control which path you see in debug
info, diagnostics, etc. which are sensitive to which path is used. That
will come in future patches that pass the name through to FileManager.
llvm-svn: 202329
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
preceded by a call to a 'noreturn' function.
For example:
unreachable();
break;
This code is idiomatic and defensive. The fact that 'break' is
unreachable here is not interesting. This occurs frequently
in LLVM/Clang itself.
llvm-svn: 202328
|
| |
|
|
|
|
| |
for calls to 'noreturn' functions.
llvm-svn: 202327
|
| |
|
|
|
|
| |
statements.
llvm-svn: 202326
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
making them NULL.
This is to support some analyses, like -Wunreachable-code, that
will need to recover the original unprunned CFG edges in order
to suppress issues that aren't really bugs in practice.
There are two important changes here:
- AdjacentBlock replaces CFGBlock* for CFG successors/predecessors.
This has the size of 2 pointers, instead of 1. This is unlikely
to have a significant memory impact on Sema since a single
CFG usually exists at one time, but could impact the memory
usage of the static analyzer. This could possibly be optimized
down to a single pointer with some cleverness.
- Predecessors can now contain null predecessors, which means
some analyses doing a reverse traversal will need to take into
account. This already exists for successors, which contain
successor slots for specific branch kinds (e.g., 'if') that
expect a fixed number of successors, even if a branch is
not reachable.
llvm-svn: 202325
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Clang is using llvm::StructType::isOpaque() as a way of signaling if
we've finished record type conversion in
CodeGenTypes::isRecordLayoutComplete(). However, Clang was setting the
body of the type before it finished laying out the type as a base type.
Laying out the %class.C.base LLVM type attempts to convert more types,
eventually recursively attempting to layout 'C' again, at which point we
would say that layout was complete, even though we were still in the
middle of it.
By not setting the body, we correctly signal that layout is not
complete, and things work as expected.
At some point, it might be worth refactoring this to avoid looking at
the LLVM IR types under construction.
llvm-svn: 202320
|
| |
|
|
|
|
| |
This is a continuation of r199686.
llvm-svn: 202307
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before this patch the globals were created with the wrong linkage and patched
afterwards. From the comments it looks like something would complain about
having an internal GV with no initializer. At least in clang the verifier will
only run way after we set the initializer, so that is not a problem.
This patch should be a nop. It just figures out the linkage earlier and
converts the old calls to setLinkage to asserts. The only case where that is
not possible is when we first see a weak import that is then implemented. In
that case we have to change the linkage, but that is the only setLinkage left.
llvm-svn: 202305
|
| |
|
|
|
|
|
| |
Upgrades the warning to an error and clarifies the message by treating the
definition as error instead of the attribute.
llvm-svn: 202300
|
| |
|
|
|
|
|
| |
The table is always 128-bit so there's no reason to specify it every time we
want the intrinsic.
llvm-svn: 202259
|
| |
|
|
| |
llvm-svn: 202254
|
| |
|
|
| |
llvm-svn: 202238
|
| |
|
|
| |
llvm-svn: 202237
|
| |
|
|
| |
llvm-svn: 202219
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
null comparison when the pointer is known to be non-null.
This catches the array to pointer decay, function to pointer decay and
address of variables. This does not catch address of function since this
has been previously used to silence a warning.
Pointer to bool conversion is under -Wbool-conversion.
Pointer to null comparison is under -Wtautological-pointer-compare, a sub-group
of -Wtautological-compare.
void foo() {
int arr[5];
int x;
// warn on these conditionals
if (foo);
if (arr);
if (&x);
if (foo == null);
if (arr == null);
if (&x == null);
if (&foo); // no warning
}
llvm-svn: 202216
|
| |
|
|
|
|
|
|
|
| |
For now, just ignore them. Later, we could try looking through LazyCompoundVals,
but we at least shouldn't crash.
<rdar://problem/16153464>
llvm-svn: 202212
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The warnings fall into three groups.
1) Using an absolute value function of the wrong type, for instance, using the
int absolute value function when the argument is a floating point type.
2) Using the improper sized absolute value function, for instance, using abs
when the argument is a long long. llabs should be used instead.
From these two cases, an implicit conversion will occur which may cause
unexpected behavior. Where possible, suggest the proper absolute value
function to use, and which header to include if the function is not available.
3) Taking the absolute value of an unsigned value. In addition to this warning,
suggest to remove the function call. This usually indicates a logic error
since the programmer assumed negative values would have been possible.
llvm-svn: 202211
|
| |
|
|
| |
llvm-svn: 202208
|
| |
|
|
|
|
| |
analysis.
llvm-svn: 202200
|
| |
|
|
|
|
|
|
| |
Paired commit with LLVM.
rdar://problem/13690847
llvm-svn: 202185
|
| |
|
|
|
|
| |
on destructors.
llvm-svn: 202181
|
| |
|
|
| |
llvm-svn: 202179
|
| |
|
|
|
|
|
| |
Generating RTTI in the MS ABI is currently not supported, and the failures
are confusing to users, so let's disable it by default for now.
llvm-svn: 202178
|
| |
|
|
|
|
|
| |
-march which doesnt exist on sparc gcc to -mcpu. While here adjust a
few tests to not write an unused temporary file.
llvm-svn: 202177
|
| |
|
|
|
|
|
| |
Reads the description of a virtual filesystem from a file and overlays
it over the real file system.
llvm-svn: 202176
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This was changed to use manual desugaring and multiplication in r201832
and fixed for multi-dimensional arrays in r201917. However, it breaks
down in the presence of typedefs. Rather than attempting to handle all
the desugaring, just go back to calling the generic type info code.
This was discovered while compiling SIInstrWaits.cpp in the R600
backend.
llvm-svn: 202175
|
| |
|
|
|
|
| |
There were many additional tests that had the bad behavior baked in.
llvm-svn: 202174
|
| |
|
|
|
|
|
|
| |
This reverts commit r202167.
It broke Analysis/auto-obj-dtors-cfg-output.cpp
llvm-svn: 202173
|
| |
|
|
| |
llvm-svn: 202170
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
- Don't emit anything when we encounter a call to a conversion operator.
"bar(a & b)" instead of "bar(a & b.operator int())"
This preserves the semantics and is still idempotent if we print the AST multiple times.
- Properly print declarations of conversion operators.
"explicit operator bool();" instead of "bool operator _Bool();"
PR18776.
llvm-svn: 202167
|
| |
|
|
|
|
|
|
|
| |
The 'f' modifier is designed for integer type arguments really (according to
its documentation). It's better to use the "half width, same number" modifier.
Should be no user-visible change.
llvm-svn: 202152
|
| |
|
|
| |
llvm-svn: 202151
|
| |
|
|
|
|
| |
Partially based on http://llvm-reviews.chandlerc.com/D2644 by Viktor Kutuzov.
llvm-svn: 202150
|
| |
|
|
|
|
| |
less OS-specific
llvm-svn: 202148
|
| |
|
|
|
|
|
|
| |
Also assert that we never create non-array string literals again.
PR18939.
llvm-svn: 202147
|
| |
|
|
|
|
|
|
| |
gets a proper constant array type.
No change in output.
llvm-svn: 202146
|
| |
|
|
| |
llvm-svn: 202141
|
| |
|
|
|
|
|
| |
This comment survived the transition from ForceInline to InlineAlways,
fix it.
llvm-svn: 202133
|
| |
|
|
|
|
|
|
|
|
| |
The __forceinline keyword's semantics are now recast as AlwaysInline and
the kw___forceinline token has its language mode set for KEYMS.
This preserves the semantics of the previous implementation but with
less duplication of code.
llvm-svn: 202131
|
| |
|
|
| |
llvm-svn: 202115
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows the 'name' field to contain a path, like
{ 'type': 'directory',
'name': '/path/to/dir',
'contents': [ ... ] }
which not only simplifies reading and writing these files (for humans),
but makes it possible to easily modify locations via textual
replacement, which would not have worked in the old scheme.
E.g. sed s:<ROOT>:<NEW ROOT>
llvm-svn: 202109
|