| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
| |
NVPTX target.
When generating the wrapper function for the offloading region, we need
to call the outlined function and cast the arguments correctly to follow
the ABI. Usually, variables captured by value are casted to `uintptr_t`
type. But this should not performed for the variables with pointer type.
llvm-svn: 330620
|
|
|
|
| |
llvm-svn: 330613
|
|
|
|
|
|
|
|
| |
Printing of ConcreteInts with size >64 bits resulted in assertion failure
in get[Z|S]ExtValue() because these methods are only allowed to be used
with integers of 64 max bit width. This patch fixes the issue.
llvm-svn: 330605
|
|
|
|
| |
llvm-svn: 330604
|
|
|
|
| |
llvm-svn: 330601
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`BugReporterVisitors.h`.
Summary: `TaintBugVisitor` is a universal visitor, and many checkers rely on it, such as `ArrayBoundCheckerV2.cpp`, `DivZeroChecker.cpp` and `VLASizeChecker.cpp`. Moving `TaintBugVisitor` to `BugReporterVisitors.h` enables other checker can also track where `tainted` value came from.
Reviewers: NoQ, george.karpenkov, xazax.hun
Reviewed By: george.karpenkov
Subscribers: szepet, rnkovacs, a.sidorin, cfe-commits, MTC
Differential Revision: https://reviews.llvm.org/D45682
llvm-svn: 330596
|
|
|
|
|
|
|
| |
There is no ownership here, passing a shared_ptr just adds confusion. No
functionality change intended.
llvm-svn: 330595
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: NoQ, george.karpenkov, xazax.hun
Reviewed By: george.karpenkov
Differential Revision: https://reviews.llvm.org/D44557
llvm-svn: 330589
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D45873
llvm-svn: 330579
|
|
|
|
|
|
|
| |
The test case in the original patch was overly contrained and
failed on PPC targets.
llvm-svn: 330575
|
|
|
|
| |
llvm-svn: 330574
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This required a couple of yaks to be shaved:
1. MatchingOpeningBlockLineIndex was misused to also store the
closing index; instead, use a second variable, as this doesn't
work correctly for "} else {".
2. We needed to change the API of AffectedRangeManager to not
use iterators; we always passed in begin / end for the whole
container before, so there was no mismatch in generality.
3. We need an extra check to discontinue formatting at the top
level, as we now sometimes change the indent of the closing
brace, but want to bail out immediately afterwards, for
example:
void f() {
if (a) {
}
void g();
Previously:
void f() {
if (a) {
}
void g();
Now:
void f() {
if (a) {
}
void g();
Differential Revision: https://reviews.llvm.org/D45726
llvm-svn: 330573
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When rebasing https://reviews.llvm.org/D40898 with GCC 5.4 on Solaris 11.4, I ran
into a few instances of
In file included from /vol/llvm/src/compiler-rt/local/test/asan/TestCases/Posix/asan-symbolize-sanity-test.cc:19:
In file included from /usr/gcc/5/lib/gcc/x86_64-pc-solaris2.11/5.4.0/../../../../include/c++/5.4.0/string:40:
In file included from /usr/gcc/5/lib/gcc/x86_64-pc-solaris2.11/5.4.0/../../../../include/c++/5.4.0/bits/char_traits.h:39:
In file included from /usr/gcc/5/lib/gcc/x86_64-pc-solaris2.11/5.4.0/../../../../include/c++/5.4.0/bits/stl_algobase.h:64:
In file included from /usr/gcc/5/lib/gcc/x86_64-pc-solaris2.11/5.4.0/../../../../include/c++/5.4.0/bits/stl_pair.h:59:
In file included from /usr/gcc/5/lib/gcc/x86_64-pc-solaris2.11/5.4.0/../../../../include/c++/5.4.0/bits/move.h:57:
/usr/gcc/5/lib/gcc/x86_64-pc-solaris2.11/5.4.0/../../../../include/c++/5.4.0/type_traits:311:39: error: __float128 is not supported on this target
struct __is_floating_point_helper<__float128>
^
during make check-all. The line above is inside
#if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_FLOAT128)
template<>
struct __is_floating_point_helper<__float128>
: public true_type { };
#endif
While the libstdc++ header indicates support for __float128, clang does not, but
should. The following patch implements this and fixed those errors.
Differential Revision: https://reviews.llvm.org/D41240
llvm-svn: 330572
|
|
|
|
|
|
|
|
| |
'llvm::TimePassesIsEnabled' inside -ftime-report feature.
Differential Revision: https://reviews.llvm.org/D45619
llvm-svn: 330571
|
|
|
|
|
|
|
|
| |
This reverts commit r330016.
The incomplete detection has too many false positives, picking up typos
for hard failures and refusing to format anything in that case.
llvm-svn: 330569
|
|
|
|
|
|
|
|
|
|
|
|
| |
If an atomic variable is misaligned (and that suspicion is why Clang emits
libcalls at all) the runtime support library will have to use a lock to safely
access it, with potentially very bad performance consequences. There's a very
good chance this is unintentional so it makes sense to issue a warning.
Also give it a named group so people can promote it to an error, or disable it
if they really don't care.
llvm-svn: 330566
|
|
|
|
|
|
|
|
|
|
|
| |
r327219 added wrappers to std::sort which randomly shuffle the container before
sorting. This will help in uncovering non-determinism caused due to undefined
sorting order of objects having the same key.
To make use of that infrastructure we need to invoke llvm::sort instead of
std::sort.
llvm-svn: 330561
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
36677
Summary:
In cindex.py, Cursor.result_type called into the wrong libclang
function, causing cursors for ObjC method declarations to return invalid
result types. Fixes Bug 36677.
Reviewers: jbcoe, rsmith
Reviewed By: jbcoe
Subscribers: cfe-commits, llvm-commits
Differential Revision: https://reviews.llvm.org/D45671
Patch by kjteske (Kyle Teske).
llvm-svn: 330557
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Add tests for the improved stream type detection added to
`llvm-bcanalyzer` in https://reviews.llvm.org/D41979.
Test Plan: `check-clang`
Reviewers: pcc, aprantl, mehdi_amini, george.karpenkov
Reviewed By: aprantl
Subscribers: cfe-commits, a.sidorin
Differential Revision: https://reviews.llvm.org/D41980
llvm-svn: 330530
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix testing of clang_File_tryGetRealPathName() in
LibclangReparseTest.FileName when executing in an environment which has
TMPDIR set to a symbolic link that points to an actual directory. The
test would fail because the name returned by
clang_File_tryGetRealPathName() has the symlink resolved but the test
compared it to the original filename of a temporary file.
The patch addresses the problem by checking only that the value returned
by clang_File_tryGetRealPathName() ends with "main.cpp".
Additionally, the patch makes the previous assertion in the test that
checks result of clang_getFileName() stricter. It newly verifies that
the name returned by the function is exactly same as what was given to
clang_parseTranslationUnit()/clang_getFile().
Differential Revision: https://reviews.llvm.org/D45807
llvm-svn: 330507
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: craig.topper, zvi
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D45254
llvm-svn: 330463
|
|
|
|
|
|
|
|
|
|
|
| |
Right now we only use this information in one place, immediately after
we calculate it, but it's still nice information to have. The Swift
project is going to use this to tidy up its "API notes" feature (see
past discussion on cfe-dev that never quite converged).
Reviewed by Bruno Cardoso Lopes.
llvm-svn: 330452
|
|
|
|
| |
llvm-svn: 330451
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some targets need special LLVM calling convention for CUDA kernel.
This patch does that through a TargetCodeGenInfo hook.
It only affects amdgcn target.
Patch by Greg Rodgers.
Revised and lit tests added by Yaxun Liu.
Differential Revision: https://reviews.llvm.org/D45223
llvm-svn: 330447
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
By default Clang outputs its version (including git commit hash, in
case of trunk builds) into object and assembly files. It might be
useful to have an option to disable this, especially for debugging
purposes.
This patch implements new command line flags -Qn and -Qy (the names
are chosen for compatibility with GCC). -Qn disables output of
the 'llvm.ident' metadata string and the 'producer' debug info. -Qy
(enabled by default) does the opposite.
Reviewers: faisalv, echristo, aprantl
Reviewed By: aprantl
Subscribers: aprantl, cfe-commits, JDevlieghere, rogfer01
Differential Revision: https://reviews.llvm.org/D45255
llvm-svn: 330442
|
|
|
|
| |
llvm-svn: 330441
|
|
|
|
|
|
|
| |
This will correctly sort some manually added entries which should
generally be avoided!
llvm-svn: 330430
|
|
|
|
|
|
|
| |
This is an advanced flag that should show up neither in clang --help
nor in the ClangCommandLineReference.
llvm-svn: 330429
|
|
|
|
|
|
|
|
|
|
|
| |
See https://blogs.msdn.microsoft.com/vcblog/2018/04/09/msvc-now-correctly-reports-__cplusplus/
clang-cl already sets __cplusplus to the correct value, so we can just ignore this flag.
Also add test coverage for a few more accepted-but-ignored flags.
https://reviews.llvm.org/D45877
llvm-svn: 330427
|
|
|
|
|
|
|
|
|
| |
* Finding installations via ptxas binary
* Relocatable device code
Differential Revision: https://reviews.llvm.org/D45449
llvm-svn: 330426
|
|
|
|
|
|
|
|
|
|
| |
nvcc generates a unique registration function for each object file
that contains relocatable device code. Unique names are achieved
with a module id that is also reflected in the function's name.
Differential Revision: https://reviews.llvm.org/D42922
llvm-svn: 330425
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch updates AddGoldPlugin to pass stats-file to the Gold plugin,
if -save-stats is passed. It also moves the save-stats option handling
to a helper function tools::getStatsFileName.
Reviewers: tejohnson, mehdi_amini, compnerd
Reviewed By: tejohnson, compnerd
Differential Revision: https://reviews.llvm.org/D45771
llvm-svn: 330422
|
|
|
|
|
|
|
|
| |
vget_low_f16() intrinsics
Related differential revision: https://reviews.llvm.org/D45668
llvm-svn: 330420
|
|
|
|
| |
llvm-svn: 330408
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Generate attribute 'denorms-are-zero'='true' if '-cl-denorms-are-zero'
compile option was specified and 'denorms-are-zero'='false' otherwise.
Patch by krisb
Reviewers: Anastasia, yaxunl
Reviewed By: yaxunl
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D45808
llvm-svn: 330404
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Loop condition variables, eg.
while (shared_ptr<int> P = getIntPtr()) { ... })
weren't handled in r324794 because they don't go through the common
CFGBuilder::VisitDeclStmt method. Which means that they regressed
after r324800.
Fix the regression by duplicating the necessary construction context scan in
the loop visiting code.
Differential Revision: https://reviews.llvm.org/D45706
llvm-svn: 330382
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a pointer cast fails (evaluates to an UnknownVal, i.e. not implemented in the
analyzer) and such cast is in fact the last use of the pointer, the pointer
symbol is no longer referenced by the program state and a leak is
(mis-)diagnosed.
"Escape" the pointer upon a failed cast, i.e. inform the checker that we can no
longer reliably track it.
Differential Revision: https://reviews.llvm.org/D45698
llvm-svn: 330380
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This implements support for the previously ignored flag
`-falign-functions`. This allows the frontend to request alignment on
function definitions in the translation unit where they are not
explicitly requested in code. This is compatible with the GCC behaviour
and the ICC behaviour.
The scalar value passed to `-falign-functions` aligns functions to a
power-of-two boundary. If flag is used, the functions are aligned to
16-byte boundaries. If the scalar is specified, it must be an integer
less than or equal to 4096. If the value is not a power-of-two, the
driver will round it up to the nearest power of two.
llvm-svn: 330378
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Function argument constructors (that are used for passing objects into functions
by value) are completely unlike temporary object constructors, but we were
treating them as such because they are also wrapped into a CXXBindTemporaryExpr.
This patch adds a partial construction context layer for call argument values,
but doesn't proceed to transform it into an actual construction context yet.
This is tells the clients that we aren't supporting these constructors yet.
Differential Revision: https://reviews.llvm.org/D45650
llvm-svn: 330377
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r315736 added support for the misplaced CF_RETURNS_RETAINED annotation on
CFRetain() wrappers. It works by trusting the function's name (seeing if it
confirms to the CoreFoundation naming convention) rather than the annotation.
There are more false positives caused by users using a different naming
convention, namely starting the function name with "retain" or "release"
rather than suffixing it with "retain" or "release" respectively.
Because this isn't according to the naming convention, these functions
are usually inlined and the annotation is therefore ignored, which is correct.
But sometimes we run out of inlining stack depth and the function is
evaluated conservatively and then the annotation is trusted.
Add support for the "alternative" naming convention and test the situation when
we're running out of inlining stack depth.
rdar://problem/18270122
Differential Revision: https://reviews.llvm.org/D45117
llvm-svn: 330375
|
|
|
|
|
|
|
|
|
| |
RecursiveASTVisitorTest.cpp is one of the longest compile jobs and a
build bottleneck on many-core machines. This patch breaks that file and
some peer files up into smaller files to increase build concurrency and
overall rebuild performance.
llvm-svn: 330353
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Under some conditions, LinkageComputer can get the visibility for
ClassTemplateSpecializationDecl wrong because it failed to find the Decl
that has the explicit visibility.
This fixes:
llvm.org/bugs/pr36810
rdar://problem/38080953
Reviewers: rsmith, arphaman, doug.gregor
Reviewed By: doug.gregor
Subscribers: doug.gregor, cfe-commits
Differential Revision: https://reviews.llvm.org/D44670
llvm-svn: 330338
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D45670
llvm-svn: 330336
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The force_align_arg_pointer attribute was using a hardcoded 16-byte
alignment value which in combination with -mstack-alignment=32 (or
larger) would produce a misaligned stack which could result in crashes
when accessing stack buffers using aligned AVX load/store instructions.
Fix the issue by using the "stackrealign" function attribute instead
of using a hardcoded 16-byte alignment.
Patch By: Gramner
Differential Revision: https://reviews.llvm.org/D45812
llvm-svn: 330331
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: This implements an alternative to r327861, namely preserving empty lines before namespace endings.
Reviewers: djasper
Reviewed By: djasper
Subscribers: klimek, cfe-commits
Differential Revision: https://reviews.llvm.org/D45373
llvm-svn: 330324
|
|
|
|
|
|
|
|
|
|
|
| |
This is the patch that lowers x86 intrinsics to native IR
in order to enable optimizations.
Patch by tkrupa
Differential Revision: https://reviews.llvm.org/D44786
llvm-svn: 330323
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: - Since 6.2 release, on supporters platforms clang is shipped with both libcxx and libcxxabi.
Reviewers: dberris, alekseyshl, EricWF
Reviewed By: dberris
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D45662
llvm-svn: 330310
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
have a non-trivial destructor.
This fixes a bug introduced in r328731 where CodeGen emits calls to
synthesized destructors for non-trivial C structs in C++ mode when the
struct passed to EmitCallArg doesn't have a non-trivial destructor.
Under Microsoft's ABI, ASTContext::isParamDestroyedInCallee currently
always returns true, so it's necessary to check whether the struct has a
non-trivial destructor before pushing a cleanup in EmitCallArg.
This fixes PR37146.
llvm-svn: 330304
|
|
|
|
|
|
| |
Fixes PR37161
llvm-svn: 330303
|
|
|
|
|
|
|
|
|
|
| |
instructions.
The new instructions were added added for sm_70+ GPUs in CUDA-9.1.
Differential Revision: https://reviews.llvm.org/D45068
llvm-svn: 330296
|