- Oct 29, 2015
-
-
Reid Kleckner authored
This works around PR25162. The MSVC tables make it very difficult to correctly inline a C++ destructor that contains try / catch. We've attempted to address PR25162 in LLVM's backend, but it feels pretty infeasible. MSVC and ICC both appear to avoid inlining such complex destructors. Long term, we want to fix this by making the inliner smart enough to know when it is inlining into a cleanup, so it can inline simple destructors (~unique_ptr and ~vector) while avoiding destructors containing try / catch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251576 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Oct 28, 2015
-
-
Reid Kleckner authored
GCC uses the x87DoubleExtended model for long doubles, and passes them indirectly by address through function calls. Also replace the existing mingw-long-double assembly emitting test with an IR-level test. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251567 91177308-0d34-0410-b5e6-96231b3b80d8
-
Ben Langmuir authored
Use the *current* state of "is-moduleness" rather than the state at serialization time so that if we read a builtin identifier from a module that wasn't "interesting" to that module, we will still write it out to a PCH that imports that module. Otherwise, we would get mysterious "unknown builtin" errors when using PCH+modules. rdar://problem/23287656 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251565 91177308-0d34-0410-b5e6-96231b3b80d8
-
Anton Yartsev authored
In addition to r251524: preserve the order the checkers were enabled/disabled to be deterministic. Additionally return the number of arguments read by 'ProcessArgs' - for debug purpose. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251552 91177308-0d34-0410-b5e6-96231b3b80d8
-
Benjamin Kramer authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251528 91177308-0d34-0410-b5e6-96231b3b80d8
-
Anton Yartsev authored
A checker may be enabled/disabled multiple times via -enable-checker and -disable-checker scan-build arguments. Currently the conflicting and repetitive arguments are passed to the analyzer as is. With this patch only the last enable/disable of a particular checker is accepted and passed to the analyzer. This change is mostly done for the upcoming 'config for scan-build' patch when multiple inclusions/exclusions of a checker are expected to be more common. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251524 91177308-0d34-0410-b5e6-96231b3b80d8
-
Benjamin Kramer authored
Most of the cases belong into an anonymous namespace. No functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251514 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alexandros Lamprineas authored
that has a thumb only CPU by default (cortex-m3), and when using the assembler, the default thumb state of the CPU does not get passed via the triple to LLVM: $ clang -target thumbv7m-none-eabi -c -v test.s clang -cc1as ... -triple armv7m-none--eabi ... test.s Differential Revision: http://reviews.llvm.org/D14121 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251507 91177308-0d34-0410-b5e6-96231b3b80d8
-
Eric Christopher authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251501 91177308-0d34-0410-b5e6-96231b3b80d8
-
John McCall authored
for all the reasons that ARC makes things implicitly unavailable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251496 91177308-0d34-0410-b5e6-96231b3b80d8
-
Saleem Abdulrasool authored
Update the linker selection to support the `-fuse-ld=` option for selecting a linker. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251493 91177308-0d34-0410-b5e6-96231b3b80d8
-
Akira Hatanaka authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251477 91177308-0d34-0410-b5e6-96231b3b80d8
-
Akira Hatanaka authored
functions. This commit fixes a bug in CGOpenMPRuntime.cpp and CGObjC.cpp where some of the function attributes are not attached to newly created functions. rdar://problem/20828324 Differential Revision: http://reviews.llvm.org/D13928 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251476 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
Summary: This is especially important so that if a change is solely inserting a block around a few statements, clang-format-diff.py will still clean up and add indentation to the inner parts. Reviewers: klimek Subscribers: cfe-commits, klimek Differential Revision: http://reviews.llvm.org/D14105 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251474 91177308-0d34-0410-b5e6-96231b3b80d8
-
John McCall authored
Fake arguments are automatically handled for serialization, cloning, and other representational tasks, but aren't included in pretty-printing or parsing (should we eventually ever automate that). This is chiefly useful for attributes that can be written by the user, but which are also frequently synthesized by the compiler, and which we'd like to remember details of the synthesis for. As a simple example, use this to narrow the cases in which we were generating a specialized note for implicitly unavailable declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251469 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Oct 27, 2015
-
-
Daniel Jasper authored
With more complex structures in C++ Lambdas and JavaScript function literals, the old value was simply to small. However, this is a temporary solution, I need to look at this more closely a) to find a fundamentally better approach and b) to look at whether the more recent usage of NoLineBreak makes us visit stuff in an unfortunate order where clang-format waste many states in dead ends. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251463 91177308-0d34-0410-b5e6-96231b3b80d8
-
Samuel Antao authored
If the user configured clang with a custom GCC toolchain that will take precedence on what the ToolChainTest.cpp expects to evaluate. This is fixed here by passing --gcc-toolchain= to the driver, in order to override any user defined GCC toolchain. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251459 91177308-0d34-0410-b5e6-96231b3b80d8
-
Anna Zaks authored
The analyzer assumes that system functions will not free memory or modify the arguments in other ways, so we assume that arguments do not escape when those are called. However, this may lead to false positive leak errors. For example, in code like this where the pointers added to the rb_tree are freed later on: struct alarm_event *e = calloc(1, sizeof(*e)); <snip> rb_tree_insert_node(&alarm_tree, e); Add a heuristic to assume that calls to system functions taking void* arguments allow for pointer escape. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251449 91177308-0d34-0410-b5e6-96231b3b80d8
-
Anna Zaks authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251448 91177308-0d34-0410-b5e6-96231b3b80d8
-
Nico Weber authored
1. Make the warning more strict in C mode. r172696 added code to suppress warnings from macro expansions in system headers, which checks `SourceMgr.isMacroBodyExpansion(E->IgnoreParens()->getExprLoc())`. Consider this snippet: #define FOO(x) (x) void f(int a) { FOO(a); } In C, the line `FOO(a)` is an `ImplicitCastExpr(ParenExpr(DeclRefExpr))`, while it's just a `ParenExpr(DeclRefExpr)` in C++. So in C++, `E->IgnoreParens()` returns the `DeclRefExpr` and the check tests the SourceLoc of `a`. In C, the `ImplicitCastExpr` has the effect of checking the SourceLoc of `FOO`, which is a macro body expansion, which causes the diagnostic to be skipped. It looks unintentional that clang does different things for C and C++ here, so use `IgnoreParenImpCasts` instead of `IgnoreParens` here. This has the effect of the warning firing more often than previously in C code – it now fires as often as it fires in C++ code. 2. Suppress the warning if it would warn on `UNREFERENCED_PARAMETER`. `UNREFERENCED_PARAMETER` is a commonly used macro on Windows and it happens to uselessly trigger -Wunused-value. As discussed in the thread "rfc: winnt.h's UNREFERENCED_PARAMETER() vs clang's -Wunused-value" on cfe-dev, fix this by special-casing this specific macro. (This costs a string comparison and some fast-path lexing per warning, but the warning is emitted rarely. It fires once in Windows.h itself, so this code runs at least once per TU including Windows.h, but it doesn't run hundreds of times.) http://reviews.llvm.org/D13969 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251441 91177308-0d34-0410-b5e6-96231b3b80d8
-
Benjamin Kramer authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251432 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Sanders authored
Summary: This is a follow on to post review comments on revision r248276. Patch by Scott Egerton. Reviewers: vkalintiris, dsanders Subscribers: joerg, rengolin, cfe-commits Differential Revision: http://reviews.llvm.org/D13100 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251430 91177308-0d34-0410-b5e6-96231b3b80d8
-
Artem Belevich authored
Linking options for particular file depend on the option that specifies the file. Currently there are two: * -mlink-bitcode-file links in complete content of the specified file. * -mlink-cuda-bitcode links in only the symbols needed by current TU. Linked symbols are internalized. This bitcode linking mode is used to link device-specific bitcode provided by CUDA. Files are linked in order they are specified on command line. -mlink-cuda-bitcode replaces -fcuda-uses-libdevice flag. Differential Revision: http://reviews.llvm.org/D13913 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251427 91177308-0d34-0410-b5e6-96231b3b80d8
-
Reid Kleckner authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251419 91177308-0d34-0410-b5e6-96231b3b80d8
-
Will Wilson authored
Microsoft connect bug: https://connect.microsoft.com/VisualStudio/feedback/details/1741530 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251415 91177308-0d34-0410-b5e6-96231b3b80d8
-
Reid Kleckner authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251412 91177308-0d34-0410-b5e6-96231b3b80d8
-
Saleem Abdulrasool authored
Expose isMutable via libClang and python bindings. Patch by Jonathan B Coe! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251410 91177308-0d34-0410-b5e6-96231b3b80d8
-
Gabor Horvath authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251407 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
Specifically, don't wrap between the {} of an empty constructor if the "}" falls on column 81 and ConstructorInitializerAllOnOneLineOrOnePerLine is set. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251406 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
Summary: If this option is set, clang-format will always insert a line wrap, e.g. before the first parameter of a function call unless all parameters fit on the same line. This obviates the need to make a decision on the alignment itself. Use this style for Google's JavaScript style and add some minor tweaks to correctly handle nested blocks etc. with it. Don't use this option for for/while loops. Reviewers: klimek Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D14104 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251405 91177308-0d34-0410-b5e6-96231b3b80d8
-
Gabor Horvath authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251404 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
hopefully make bots happy again. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251397 91177308-0d34-0410-b5e6-96231b3b80d8
-
Michael Kuperstein authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251396 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251391 91177308-0d34-0410-b5e6-96231b3b80d8
-
Eric Christopher authored
only one of a group of possibilities. This changes the syntax in the builtin files to represent: , as the and operator | as the or operator The former syntax matches how the backend tablegen files represent multiple subtarget features being required. Updated the builtin and intrinsic headers accordingly for the new syntax. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251388 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
of await_* calls, and AST representation for same. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251387 91177308-0d34-0410-b5e6-96231b3b80d8
-
Xinliang David Li authored
Create undef reference to profile hook symbol when PGO instrumentation is turned on. This allows LLVM to omit emission of hook variable use method for every single module instrumented. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251385 91177308-0d34-0410-b5e6-96231b3b80d8
-
John McCall authored
allow them to be written in certain kinds of user declaration and diagnose on the use-site instead. Also, improve and fix some diagnostics relating to __weak and properties. rdar://23228631 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251384 91177308-0d34-0410-b5e6-96231b3b80d8
-
Eric Christopher authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251371 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Oct 26, 2015
-
-
Ismail Pazarbasi authored
Summary: In `MismatchingNewDeleteDetector::analyzeInClassInitializer`, if `Field`'s initializer expression is null, lookup the field in implicit instantiation, and use found field's the initializer. Reviewers: rsmith, rtrieu Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D9898 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251335 91177308-0d34-0410-b5e6-96231b3b80d8
-