- Nov 30, 2017
-
-
Roman Lebedev authored
Summary: Currently clang static analyzer does warn on: ``` int x; x+=1; x-=1; x=x+1; x=x-1; ``` But does warn on: ``` int x; x++; x--; --x; ++x; ``` This differential should fix that. Fixes https://bugs.llvm.org/show_bug.cgi?id=35419 Reviewers: dcoughlin, NoQ Reviewed By: dcoughlin Subscribers: NoQ, xazax.hun, szepet, cfe-commits, a.sidorin Tags: #clang Differential Revision: https://reviews.llvm.org/D40463 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319411 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
Sometimes we check the validity of some construct between producing a diagnostic and producing its notes. Ideally, we wouldn't do that, but in practice running code that "cannot possibly produce a diagnostic" in such a situation should be safe, and reasonable factoring of some code requires it with our current diagnostics infrastruture. If this does happen, a diagnostic that's suppressed due to SFINAE should not cause notes connected to the prior diagnostic to be suppressed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319408 91177308-0d34-0410-b5e6-96231b3b80d8
-
Dean Michael Berris authored
Summary: The -fxray-always-emit-customevents flag instructs clang to always emit the LLVM IR for calls to the `__xray_customevent(...)` built-in function. The default behaviour currently respects whether the function has an `[[clang::xray_never_instrument]]` attribute, and thus not lower the appropriate IR code for the custom event built-in. This change allows users calling through to the `__xray_customevent(...)` built-in to always see those calls lowered to the corresponding LLVM IR to lay down instrumentation points for these custom event calls. Using this flag enables us to emit even just the user-provided custom events even while never instrumenting the start/end of the function where they appear. This is useful in cases where "phase markers" using __xray_customevent(...) can have very few instructions, must never be instrumented when entered/exited. Reviewers: rnk, dblaikie, kpw Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D40601 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319388 91177308-0d34-0410-b5e6-96231b3b80d8
-
Hans Wennborg authored
MS ABI: Treat explicit instantiation definitions of dllimport function templates as explicit instantiation decls (PR35435) This matches MSVC's behaviour, and we already do it for class templates since r270897. Differential revision: https://reviews.llvm.org/D40621 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319386 91177308-0d34-0410-b5e6-96231b3b80d8
-
Eugene Zelenko authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319384 91177308-0d34-0410-b5e6-96231b3b80d8
-
Aaron Ballman authored
Perform a bounds check on a function's argument list before accessing any index value specified by an 'argument_with_type_tag' attribute. Fixes PR28520. Patch by Matt Davis. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319383 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Nov 29, 2017
-
-
Eugene Zelenko authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319376 91177308-0d34-0410-b5e6-96231b3b80d8
-
Vedant Kumar authored
Emit a gap area starting after the r-paren location and ending at the start of the body for the braces-optional statements (for, for-each, while, etc). The count for the gap area equal to the body's count. This extends the fix in r317758. Fixes PR35387, rdar://35570345 Testing: stage2 coverage-enabled build of clang, check-clang git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319373 91177308-0d34-0410-b5e6-96231b3b80d8
-
Reid Kleckner authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319364 91177308-0d34-0410-b5e6-96231b3b80d8
-
Reid Kleckner authored
Fixes regression introduced by r319297. MSVC environments still use SEH unwind opcodes but they should use the Microsoft C++ EH personality, not the mingw one. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319363 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alexey Bataev authored
directives. According to the OpenMP standard, only loop control variables can be used in linear clauses of distribute-based simd directives. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319362 91177308-0d34-0410-b5e6-96231b3b80d8
-
Aaron Ballman authored
Patch by Julie Hockett. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319360 91177308-0d34-0410-b5e6-96231b3b80d8
-
Mandeep Singh Grang authored
Summary: This fixes the following failure uncovered by D39245: Clang :: Index/getcursor-preamble.m Reviewers: gbenyei, akyrtzi, bkramer, arphaman Reviewed By: arphaman Subscribers: arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D40618 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319357 91177308-0d34-0410-b5e6-96231b3b80d8
-
Reid Kleckner authored
This warning is known to be noisy and projects frequently disable it. In particular, this should make building isl as bundled in polly with clang-cl a lot quieter. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319336 91177308-0d34-0410-b5e6-96231b3b80d8
-
Devin Coughlin authored
In the original design of the analyzer, it was assumed that a BlockEntrance doesn't create a new binding on the Store, but this assumption isn't true when 'widen-loops' is set to true. Fix this by finding an appropriate location BlockEntrace program points. Patch by Henry Wong! Differential Revision: https://reviews.llvm.org/D37187 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319333 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alexey Bataev authored
directives. `linear` clause is not allowed on non-simd distribute-based directives. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319332 91177308-0d34-0410-b5e6-96231b3b80d8
-
Chad Rosier authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319323 91177308-0d34-0410-b5e6-96231b3b80d8
-
Ismail Donmez authored
../tools/clang/lib/Driver/ToolChains/Cuda.cpp:80:18: error: reference to non-static member function must be called; did you mean to call it with no arguments? if (Distro(D.getVFS).IsDebian()) ~~^~~~~~ () git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319322 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alexey Bataev authored
directive, NFC. Some general improvements in support of `teams distribute` directive. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319320 91177308-0d34-0410-b5e6-96231b3b80d8
-
Sylvestre Ledru authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319319 91177308-0d34-0410-b5e6-96231b3b80d8
-
Manuel Klimek authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319318 91177308-0d34-0410-b5e6-96231b3b80d8
-
Sylvestre Ledru authored
Summary: Reported here: http://bugs.debian.org/882505 Patch by Andreas Beckmann Reviewers: Hahnfeld, tra Reviewed By: tra Subscribers: jlebar, cfe-commits Differential Revision: https://reviews.llvm.org/D40453 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319317 91177308-0d34-0410-b5e6-96231b3b80d8
-
Manuel Klimek authored
This fixes some bugs in the reflowing logic and splits out the concerns of reflowing from BreakableToken. Things to do after this patch: - Refactor the breakProtrudingToken function possibly into a class, so we can split it up into methods that operate on the common state. - Optimize whitespace compression when reflowing by using the next possible split point instead of the latest possible split point. - Retry different strategies for reflowing (strictly staying below the column limit vs. allowing excess characters if possible). Differential Revision: https://reviews.llvm.org/D40310 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319314 91177308-0d34-0410-b5e6-96231b3b80d8
-
Martell Malone authored
This is a re-apply of r319294. adds -fseh-exceptions and -fdwarf-exceptions flags clang will check if the user has specified an exception model flag, in the absense of specifying the exception model clang will then check the driver default and append the model flag for that target to cc1 -fno-exceptions has a higher priority then specifying the model move __SEH__ macro definitions out of Targets into InitPreprocessor behind the -fseh-exceptions flag move __ARM_DWARF_EH__ macrodefinitions out of verious targets and into InitPreprocessor behind the -fdwarf-exceptions flag and arm|thumb check remove unused USESEHExceptions from the MinGW Driver fold USESjLjExceptions into a new GetExceptionModel function that gives the toolchain classes more flexibility with eh models Reviewers: rnk, mstorsjo Differential Revision: https://reviews.llvm.org/D39673 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319297 91177308-0d34-0410-b5e6-96231b3b80d8
-
Martell Malone authored
This reverts rL319294. The windows sanitizer does not like seh on x86. Will re apply with None type for x86 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319295 91177308-0d34-0410-b5e6-96231b3b80d8
-
Martell Malone authored
adds -fseh-exceptions and -fdwarf-exceptions flags clang will check if the user has specified an exception model flag, in the absense of specifying the exception model clang will then check the driver default and append the model flag for that target to cc1 clang cc1 assumes dwarf is the default if none is passed and -fno-exceptions has a higher priority then specifying the model move __SEH__ macro definitions out of Targets into InitPreprocessor behind the -fseh-exceptions flag move __ARM_DWARF_EH__ macrodefinitions out of verious targets and into InitPreprocessor behind the -fdwarf-exceptions flag and arm|thumb check remove unused USESEHExceptions from the MinGW Driver fold USESjLjExceptions into a new GetExceptionModel function that gives the toolchain classes more flexibility with eh models Reviewers: rnk, mstorsjo Differential Revision: https://reviews.llvm.org/D39673 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319294 91177308-0d34-0410-b5e6-96231b3b80d8
-
Serge Pavlov authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319290 91177308-0d34-0410-b5e6-96231b3b80d8
-
Jake Ehrlich authored
I had to reland this change in order to make the test work on windows This change should resolve https://bugs.llvm.org/show_bug.cgi?id=35022 https://reviews.llvm.org/D39627 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319269 91177308-0d34-0410-b5e6-96231b3b80d8
-
Petr Hosek authored
Passthrough LLVM_ENABLE_{PROJECTS,RUNTIMES} to followup stages to support the side-by-side checkouts (aka monorepo layout). Differential Revision: https://reviews.llvm.org/D40258 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319267 91177308-0d34-0410-b5e6-96231b3b80d8
-
Petr Hosek authored
Escaping ; in list arguments passed to ExternalProject_Add doesn't seem to be working in newer versions of CMake (see https://public.kitware.com/Bug/view.php?id=16137 for more details). Use a custom LIST_SEPARATOR instead which is the officially supported way. Differential Revision: https://reviews.llvm.org/D40257 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319264 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Nov 28, 2017
-
-
Alexey Bataev authored
The handling and capturing of the non-constant expressions of some of the capturable clauses in combined directives is generalized. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319227 91177308-0d34-0410-b5e6-96231b3b80d8
-
Mandeep Singh Grang authored
Summary: This fixes the following failures uncovered by D39245: Clang :: OpenMP/task_firstprivate_codegen.cpp Clang :: OpenMP/task_private_codegen.cpp Clang :: OpenMP/taskloop_firstprivate_codegen.cpp Clang :: OpenMP/taskloop_lastprivate_codegen.cpp Clang :: OpenMP/taskloop_private_codegen.cpp Clang :: OpenMP/taskloop_simd_firstprivate_codegen.cpp Clang :: OpenMP/taskloop_simd_lastprivate_codegen.cpp Clang :: OpenMP/taskloop_simd_private_codegen.cpp Reviewers: rjmccall, ABataev, AndreyChurbanov Reviewed By: rjmccall, ABataev Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D39947 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319222 91177308-0d34-0410-b5e6-96231b3b80d8
-
Artem Belevich authored
This fixes erroneously reported CUDA compilation errors in host-side code during device-side compilation. I've also restricted OpenMP-specific checks to trigger only if we're compiling with OpenMP enabled. Differential Revision: https://reviews.llvm.org/D40275 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319201 91177308-0d34-0410-b5e6-96231b3b80d8
-
Craig Topper authored
Currently CodeGen is calling std::sort on the features vector in TargetOptions for every function, but I don't think CodeGen should be modifying TargetOptions. Differential Revision: https://reviews.llvm.org/D40228 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319195 91177308-0d34-0410-b5e6-96231b3b80d8
-
Serge Pavlov authored
These functions were defined as static members of TemplateSpecializationType. Now they are moved to namespace level. Previously there were different implementations for lists containing TemplateArgument and TemplateArgumentLoc, now these implementations share the same code. This change is a result of refactoring patch D40508. NFC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319178 91177308-0d34-0410-b5e6-96231b3b80d8
-
Martin Storsjo authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319145 91177308-0d34-0410-b5e6-96231b3b80d8
-
Dan Gohman authored
This adds ways to control use of WebAssembly's new nontrapping-fptoint feature. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319129 91177308-0d34-0410-b5e6-96231b3b80d8
-
Reid Kleckner authored
cl interprets this option to mean enable every supported warning, which is what Clang's -Weverything flag does. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319116 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Nov 27, 2017
-
-
Dan Gohman authored
The WebAssembly standard does not yet have threads, and while it's in the process of being standardized, it'll take some time for it to make it through and be available in all popular implementations. With increasing numbers of people using the LLVM wasm backend through LLVM directly rather than through Emscripten, it's increasingly important to have friendly defaults. See also https://bugs.llvm.org/show_bug.cgi?id=35411 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319101 91177308-0d34-0410-b5e6-96231b3b80d8
-
Petr Hosek authored
It's used to determine whether terminal supports colors, but within LLVM it's only used in handful of places and in Clang it's only used in AST dumper, otherwise Clang relies on the -fcolor-diagnostics flag which we pass explicitly from our build system anyway. This eliminates one of the shared libraries dependencies making the toolchain less reliant on the host environment. Differential Revision: https://reviews.llvm.org/D40329 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319088 91177308-0d34-0410-b5e6-96231b3b80d8
-