- Jul 25, 2017
-
-
Sean Callanan authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309018 91177308-0d34-0410-b5e6-96231b3b80d8
-
Sean Callanan authored
This patch adds functionality and a test for importing Objective-C classes and their methods. It also adds a flag to clang-import-test to set the language used for parsing. This takes the same argument format as the -x option to the driver. Differential Revision: https://reviews.llvm.org/D35274 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309014 91177308-0d34-0410-b5e6-96231b3b80d8
-
Vedant Kumar authored
Patch by Hamza Sood! Differential Revision: https://reviews.llvm.org/D35729 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309013 91177308-0d34-0410-b5e6-96231b3b80d8
-
Vedant Kumar authored
The instrumentation generated by -fsanitize=vptr does not null check a user pointer before loading from it. This causes crashes in the face of UB member calls (this=nullptr), i.e it's causing user programs to crash only after UBSan is turned on. The fix is to make run-time null checking a prerequisite for enabling -fsanitize=vptr, and to then teach UBSan to reuse these run-time null checks to make -fsanitize=vptr safe. Testing: check-clang, check-ubsan, a stage2 ubsan-enabled build Differential Revision: https://reviews.llvm.org/D35735 https://bugs.llvm.org/show_bug.cgi?id=33881 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309007 91177308-0d34-0410-b5e6-96231b3b80d8
-
Peter Szecsi authored
This feature allows the analyzer to consider loops to completely unroll. New requirements/rules (for unrolling) can be added easily via ASTMatchers. Right now it is hidden behind a flag, the aim is to find the correct heuristic and create a solution which results higher coverage % and more precise analysis, thus can be enabled by default. Right now the blocks which belong to an unrolled loop are marked by the LoopVisitor which adds them to the ProgramState. Then whenever we encounter a CFGBlock in the processCFGBlockEntrance which is marked then we skip its investigating. That means, it won't be considered to be visited more than the maximal bound for visiting since it won't be checked. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309006 91177308-0d34-0410-b5e6-96231b3b80d8
-
Eric Christopher authored
Revert "This patch enables the usage of constant Enum identifiers within Microsoft style inline assembly statements." as it is causing msan failures. This reverts commits r308985 and r308965 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309004 91177308-0d34-0410-b5e6-96231b3b80d8
-
Nico Weber authored
Projects that want to statically link their own C++ standard library currently need to pass -nostdlib or -nodefaultlibs, which also disables linking of the builtins library, -lm, and so on. Alternatively, they could use `clang` instead of `clang++`, but that already disables implicit addition of -lm on some toolchains. Add a dedicated flag -nostdlib++ that disables just linking of libc++ / libstdc++. This is analogous to -nostdinc++. https://reviews.llvm.org/D35780 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308997 91177308-0d34-0410-b5e6-96231b3b80d8
-
Gor Nishanov authored
Reviewers: rsmith Reviewed By: rsmith Subscribers: EricWF, cfe-commits Differential Revision: https://reviews.llvm.org/D35383 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308996 91177308-0d34-0410-b5e6-96231b3b80d8
-
Devin Coughlin authored
Add a 'Generalized' object kind to the retain-count checker and suitable generic diagnostic text for retain-count diagnostics involving those objects. For now the object kind is introduced in summaries by 'annotate' attributes. Once we have more experience with these annotations we will propose explicit attributes. Patch by Malhar Thakkar! Differential Revision: https://reviews.llvm.org/D35613 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308990 91177308-0d34-0410-b5e6-96231b3b80d8
-
Nemanja Ivanovic authored
Notifying the author via Diffusion did not yield any answer. Therefore, I'm adding the missing triple. I have no idea if this is the intended triple, but it seems to fit the bill and should turn the bots back to green. If the intended triple is a different one, please feel free to change it but I need make this change to turn the bots back to green now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308985 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alexey Bataev authored
Added codegen for taskgroup directive with task_reduction clause. ``` <body> ``` The next code is emitted: ``` %struct.kmp_task_red_input_t red_init[n]; void *td; call void @__kmpc_taskgroup(%ident_t id, i32 gtid) ... red_init[i].shar = &<item>; red_init[i].size = sizeof(<item>); red_init[i].init = (void*)initializer_function; red_init[i].fini = (void*)destructor_function; red_init[i].comb = (void*)combiner_function; red_init[i].flags = flags; ... td = call i8* @__kmpc_task_reduction_init(i32 gtid, i32 n, i8* (void*)red_init); call void @__kmpc_end_taskgroup(%ident_t id, i32 gtid) void initializer_function(i8* priv) { *(<type>*)priv = <red_init>; ret void; } void destructor_function(i8* priv) { (<type>*)priv->~(); ret void; } void combiner_function(i8* inout, i8* in) { *(<type>*)inout = *(<type>*)inout <red_id> *(<type>*)in; ret void; } ``` git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308979 91177308-0d34-0410-b5e6-96231b3b80d8
-
Manuel Klimek authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308969 91177308-0d34-0410-b5e6-96231b3b80d8
-
Chandler Carruth authored
Without this, -fno-builtin and friends doesn't work. Added the obvious RUN lines to the test for -fno-builtin and they pass now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308967 91177308-0d34-0410-b5e6-96231b3b80d8
-
Matan Haroush authored
This patch enables the usage of constant Enum identifiers within Microsoft style inline assembly statements. Differential Revision: https://reviews.llvm.org/D33277 https://reviews.llvm.org/D33278 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308965 91177308-0d34-0410-b5e6-96231b3b80d8
-
Manuel Klimek authored
CurrentDir was set as the path of the current module, but that can change as part of a chain of loaded modules. When we try to locate a file mentioned in a module that does not exist, we use a heuristic to look at the relative path between the original location of the module and the file we look for, and use that relatively to the CurrentDir. This only works if CurrentDir is the same as the (current) path of the module file the file was mentioned in; if it is not, we look at the path relatively to the wrong directory, and can end up reading random unrelated files that happen to have the same name. This patch fixes this by using the BaseDirectory of the module file the file we look for was mentioned in instead of the CurrentDir heuristic. Differential Revision: https://reviews.llvm.org/D35828 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308962 91177308-0d34-0410-b5e6-96231b3b80d8
-
Artem Dergachev authored
Because since r308957 the suppress-on-sink feature contains its own mini-analysis, it also needs to become aware that C++ unhandled exceptions cause sinks. Unfortunately, for now we treat all exceptions as unhandled in the analyzer, so suppress-on-sink needs to do the same. rdar://problem/28157554 Differential Revision: https://reviews.llvm.org/D35674 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308961 91177308-0d34-0410-b5e6-96231b3b80d8
-
Artem Dergachev authored
If a certain memory leak (or other similar bug) found by the analyzer is known to be happening only before abnormal termination of the program ("sink", eg. assertion failure in the code under analysis, or another bug that introduces undefined behavior), such leak warning is discarded. However, if the analysis has never reaches completion (due to complexity of the code), it may be failing to notice the sink. This commit further extends the partial solution introduced in r290341 to cover cases when a complicated control flow occurs before encountering a no-return statement (which anyway inevitably leads to such statement(s)) by traversing the respective section of the CFG in a depth-first manner. A complete solution still seems elusive. rdar://problem/28157554 Differential Revision: https://reviews.llvm.org/D35673 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308957 91177308-0d34-0410-b5e6-96231b3b80d8
-
Faisal Vali authored
- This will also be used for the forthcoming __VA_OPT__ feature approved for C++2a. - recommended by rsmith during his review of the __VA_OPT__ patch (https://reviews.llvm.org/D35782) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308948 91177308-0d34-0410-b5e6-96231b3b80d8
-
Adrian Prantl authored
This patch adds an early exit to CGDebugInfo::completeClassData() when compiling with -gmodules and the to-be-completed type is available in a clang module. rdar://problem/23599990 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308938 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jul 24, 2017
-
-
Reid Kleckner authored
Revert "[X86][InlineAsm][Ms Compatibility]Prefer variable name over a register when the two collides" This reverts r308867 and r308866. It broke the sanitizer-windows buildbot on C++ code similar to the following: namespace cl { } void f() { __asm { mov al, cl } } t.cpp(4,13): error: unexpected namespace name 'cl': expected expression mov al, cl ^ In this case, MSVC parses 'cl' as a register, not a namespace. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308926 91177308-0d34-0410-b5e6-96231b3b80d8
-
Krasimir Georgiev authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308918 91177308-0d34-0410-b5e6-96231b3b80d8
-
Shoaib Meenai authored
Under Windows Itanium, we need to export virtual and non-virtual thunks if the functions being thunked are exported. These thunks would previously inherit their dllexport attribute from the declaration, but r298330 changed declarations to not have dllexport attributes. We therefore need to add the dllexport attribute to the definition ourselves now. This is consistent with MinGW GCC's behavior. This redoes r306770 but limits the logic to Itanium. MicrosoftCXXABI's setThunkLinkage ensures that thunks aren't exported under that ABI, so I'm handling this in ItaniumCXXABI's setThunkLinkage for symmetry. We need to export these thunks because they can be referenced outside the library they're defined in. For example, if a child class without a key function inherits from a parent class with a key function, the parent's thunks will only be defined in the library with the key function, but the construction vtable for the parent in the child might be emitted outside the library (since the child doesn't have a key function), and it needs to reference the parent's thunks. We don't need to mark these thunks as imported since any references to them will occur in data, so the compiler can't generate the IAT load sequence anyway. Instead, we rely on the linker generating import thunks for the thunks. Differential Revision: https://reviews.llvm.org/D34972 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308899 91177308-0d34-0410-b5e6-96231b3b80d8
-
Tim Northover authored
Most of them are virtual anyway, and the few remaining ones can move to the .cpp for consistency. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308898 91177308-0d34-0410-b5e6-96231b3b80d8
-
Nico Weber authored
C2017 update 3 produces a clang that crashes when compiling clang. Disabling optimizations for StmtProfiler::VisitCXXOperatorCallExpr() makes the crash go away. Patch from Bruce Dawson <brucedawson@chromium.org>! https://reviews.llvm.org/D35757 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308897 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alexey Bataev authored
This patch allows to use in_reduction clause even if the innermost directive is not taskgroup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308883 91177308-0d34-0410-b5e6-96231b3b80d8
-
Krasimir Georgiev authored
Summary: This fixes a regression exposed by r307795 and rL308725 in which the level of a comment line between '} else {' and a preprocessor directive is incorrectly set as the level of the '} else {' line. For example, this : ``` int f(int i) { if (i) { ++i; } else { // comment #ifdef A --i; #endif } } ``` was formatted as: ``` int f(int i) { if (i) { ++i; } else { // comment #ifdef A --i; #endif } } ``` Reviewers: djasper, klimek Reviewed By: klimek Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D35794 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308882 91177308-0d34-0410-b5e6-96231b3b80d8
-
Simon Dardis authored
Add support for -m(no-)extern-data when using -mgpopt in the driver. It is enabled by default in the backend. Reviewers: atanasyan, slthakur Differential Revision: https://reviews.llvm.org/D35550 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308879 91177308-0d34-0410-b5e6-96231b3b80d8
-
Coby Tayree authored
On MS-style, the following snippet: int eax; __asm mov eax, ebx should yield loading of ebx, into the location pointed by the variable eax This patch sees to it. Currently, a reg-to-reg move would have been invoked. llvm: D34739 Differential Revision: https://reviews.llvm.org/D34740 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308867 91177308-0d34-0410-b5e6-96231b3b80d8
-
Petr Hosek authored
Patch by Roland McGrath Differential Revision: https://reviews.llvm.org/D35747 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308855 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jul 23, 2017
-
-
Nico Weber authored
All but one place are checking options::OPT_nostdlib instead of looking at this field, so convert that one other place to doing that as well. No behavior change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308848 91177308-0d34-0410-b5e6-96231b3b80d8
-
NAKAMURA Takumi authored
This gets rid of almost LLVM targets unconditionally depending on intrinsic_gen. Clang's modules still have weird dependencies and hard to remove intrinsics_gen in better way. Then, it'd be better to give whole clang targets depend on intrinsic_gen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308844 91177308-0d34-0410-b5e6-96231b3b80d8
-
NAKAMURA Takumi authored
It cuts clangFormat's dependencies out of; Clang_Analysis Clang_C Clang_Diagnostics Clang_Driver Clang_Frontend Clang_Sema Clang_Serialization Clang_StaticAnalyzer_Core Clang_Tooling -> Clang_ToolingCore Now, the module Clang_Format depends on; Clang_AST Clang_Basic Clang_ToolingCore git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308832 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jul 22, 2017
-
-
Yuka Takahashi authored
Summary: -Wno-<warning> was autocompleted as -Wno<warning>, so fixed this typo. Differential Revision: https://reviews.llvm.org/D35762 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308824 91177308-0d34-0410-b5e6-96231b3b80d8
-
Faisal Vali authored
... in the few remaining places where this was not corrected. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308823 91177308-0d34-0410-b5e6-96231b3b80d8
-
Ben Langmuir authored
We have the same relation between class properties and getter/setters that we have for instance properties, so set the same symbol sub-kind. rdar://problem/32376404 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308800 91177308-0d34-0410-b5e6-96231b3b80d8
-
Erich Keane authored
Bitrig code has been merged back to OpenBSD, thus the OS has been abandoned. Differential Revision: https://reviews.llvm.org/D35708 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308797 91177308-0d34-0410-b5e6-96231b3b80d8
-
Erich Keane authored
Targets.cpp is getting unwieldy, and even minor changes cause the entire thing to cause recompilation for everyone. This patch bites the bullet and breaks it up into a number of files. I tended to keep function definitions in the class declaration unless it caused additional includes to be necessary. In those cases, I pulled it over into the .cpp file. Content is copy/paste for the most part, besides includes/format/etc. Differential Revision: https://reviews.llvm.org/D35701 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308791 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jul 21, 2017
-
-
Richard Trieu authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308783 91177308-0d34-0410-b5e6-96231b3b80d8
-
Krzysztof Parzyszek authored
The codegen testcase was checking for specific value names. Make it ignore the names instead as they are irrelevant. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308782 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Trieu authored
Add Heading string to attribute documentation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308777 91177308-0d34-0410-b5e6-96231b3b80d8
-