- Feb 20, 2016
-
-
Duncan P. N. Exon Smith authored
Check up front whether the header map buffer has space for all of its declared buckets. There was already a check in `getBucket()`, but it had UB (comparing pointers that were outside of objects in the error path) and was insufficient (only checking for a single byte of the relevant bucket). I fixed the check, moved it to `checkHeader()`, and left a fixed version behind as an assertion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261449 91177308-0d34-0410-b5e6-96231b3b80d8
-
Duncan P. N. Exon Smith authored
If the number of buckets is not a power of two, immediately recognize the header map as corrupt, rather than waiting for the first lookup. I converted the later check to an assert. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261448 91177308-0d34-0410-b5e6-96231b3b80d8
-
Duncan P. N. Exon Smith authored
Split the implementation of `HeaderMap` into `HeaderMapImpl` so that we can write unit tests that don't depend on the `FileManager`, and then write a few tests that cover the types of corrupt header maps already detected. This also moves type and constant definitions from HeaderMap.cpp to HeaderMapTypes.h so that the test can access them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261446 91177308-0d34-0410-b5e6-96231b3b80d8
-
Argyrios Kyrtzidis authored
[c-index-test] CMake: When installing c-index-test to a different prefix directory, add an rpath so that it can find libclang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261445 91177308-0d34-0410-b5e6-96231b3b80d8
-
Duncan P. N. Exon Smith authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261443 91177308-0d34-0410-b5e6-96231b3b80d8
-
Duncan P. N. Exon Smith authored
`std::unique_ptr<MemoryBuffer>` already deletes these, so there's no reason for the boiler-plate in HeaderMap. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261442 91177308-0d34-0410-b5e6-96231b3b80d8
-
David Majnemer authored
The -EHc flag implicitly adds a nothrow attribute to any extern "C" function when exceptions are enabled. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261425 91177308-0d34-0410-b5e6-96231b3b80d8
-
David Majnemer authored
These are legacy flags which map to /EHsc and /EHs-c- respectively. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261424 91177308-0d34-0410-b5e6-96231b3b80d8
-
David Majnemer authored
This flag no longer controls any behavior inside of clang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261423 91177308-0d34-0410-b5e6-96231b3b80d8
-
Roman Divacky authored
It can happen that when we only have 1 more register left in the regsave area we need to store a value bigger than 1 register and therefore we go to the overflow area. In this case we have to leave the last slot in the regsave area unused and keep using overflow area. Do this by storing a limit value to the used register counter in the overflow block. Issue diagnosed by and solution tested by Mark Millard! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261422 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alexey Bataev authored
OpenMP 4.5 allows to privatize non-static data members of current class in non-static member functions. Patch adds initial support for data members. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261412 91177308-0d34-0410-b5e6-96231b3b80d8
-
David Majnemer authored
This fixes PR26675. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261388 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Feb 19, 2016
-
-
Richard Smith authored
exported module macros outside local submodule visibility mode. Related to PR24667. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261373 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
option. Previously these options could both be used to specify that you were compiling the implementation file of a module, with a different set of minor bugs in each case. This change removes -fmodule-implementation-of, and instead tracks a flag to determine whether we're currently building a module. -fmodule-name now behaves the same way that -fmodule-implementation-of previously did. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261372 91177308-0d34-0410-b5e6-96231b3b80d8
-
Anastasia Stulova authored
Add support for opencl_unroll_hint attribute from OpenCL v2.0 s6.11.5. Reusing most of metadata generation from CGLoopInfo helper class. The code is based on Khronos OpenCL compiler: https://github.com/KhronosGroup/SPIR/tree/spirv-1.0 Patch by Liu Yaxun (Sam)! Differential Revision: http://reviews.llvm.org/D16686 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261350 91177308-0d34-0410-b5e6-96231b3b80d8
-
Serge Pavlov authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261323 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alexey Bataev authored
"aligned", by Vladimir Yakovlev Fix clang/gcc incompatibility of bitfields layout in the presence of pragma packed and attributes aligned and packed. Differential Revision: http://reviews.llvm.org/D17023 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261321 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alexey Bataev authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261315 91177308-0d34-0410-b5e6-96231b3b80d8
-
David Majnemer authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261312 91177308-0d34-0410-b5e6-96231b3b80d8
-
JF Bastien authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261310 91177308-0d34-0410-b5e6-96231b3b80d8
-
JF Bastien authored
Summary: Rich Felker was sad that clang used 'w' and 'P' for VFP constraints when GCC documents them as 't' and 'w': https://gcc.gnu.org/onlinedocs/gcc/Machine-Constraints.html This was added way back in 2008: http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20080421/005393.html Subscribers: aemerson, rengolin, cfe-commits Differential Revision: http://reviews.llvm.org/D17349 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261309 91177308-0d34-0410-b5e6-96231b3b80d8
-
Nico Weber authored
For templates, fields can have incomplete types: template <class T> struct A2 { struct B; B b; }; Don't try to touch the DefinitionData of those fields. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261301 91177308-0d34-0410-b5e6-96231b3b80d8
-
Nico Weber authored
C++11 requires const objects to have a user-provided constructor, even for classes without any fields. DR 253 relaxes this to say "If the implicit default constructor initializes all subobjects, no initializer should be required." clang is currently the only compiler that implements this C++11 rule, and e.g. libstdc++ relies on something like DR 253 to compile in newer versions. This change makes it possible to build code that says `const vector<int> v;' again when using libstdc++5.2 and _GLIBCXX_DEBUG (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60284). Fixes PR23381. http://reviews.llvm.org/D16552 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261297 91177308-0d34-0410-b5e6-96231b3b80d8
-
Nico Weber authored
Created by: cd www curl -O http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_index.html ./make_cxx_dr_status git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261295 91177308-0d34-0410-b5e6-96231b3b80d8
-
Devin Coughlin authored
Add a checker callback that is called when the analyzer starts analyzing a function either at the top level or when inlined. This will be used by a follow-on patch making the DeallocChecker path sensitive. Differential Revision: http://reviews.llvm.org/D17418 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261293 91177308-0d34-0410-b5e6-96231b3b80d8
-
Reid Kleckner authored
Fixes crash referenced in PR25181 where dyn_cast is called on a null instance of LM.Method. Reviewers: majnemer, rnk Patch by Don Hinton Differential Revision: http://reviews.llvm.org/D17072 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261292 91177308-0d34-0410-b5e6-96231b3b80d8
-
Reid Kleckner authored
ClangConfig requires LLVMConfig, so add find_package call in ClangConfig so find_package(clang REQUIRED CONFIG) will just work. This makes it easier for cmake based projects to use clang, e.g., tools using ClangTooling. Patch by Don Hinton Differential Revision: http://reviews.llvm.org/D13622 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261290 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Trieu authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261285 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Trieu authored
-Wcomma will detect and warn on most uses of the builtin comma operator. It currently whitelists the first and third statements of the for-loop. For other cases, the warning can be silenced by casting the first operand of the comma operator to void. Differential Revision: http://reviews.llvm.org/D3976 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261278 91177308-0d34-0410-b5e6-96231b3b80d8
-
Argyrios Kyrtzidis authored
Patch by Elisavet Sakellari! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261274 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Feb 18, 2016
-
-
Richard Trieu authored
Cleanup for upcoming Clang warning -Wcomma. No functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261271 91177308-0d34-0410-b5e6-96231b3b80d8
-
Akira Hatanaka authored
The code in TypeLocBuilder::pushImpl wasn't correctly handling the case where an element that has an 8-byte alignment was being pushed. I plan to follow up with a patch to remove redundancies and simplify the function. rdar://problem/23838912 Differential Revision: http://reviews.llvm.org/D16843 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261260 91177308-0d34-0410-b5e6-96231b3b80d8
-
Krzysztof Parzyszek authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261253 91177308-0d34-0410-b5e6-96231b3b80d8
-
David L. Jones authored
Using Backend_EmitLL attemps to create a file with an empty filename. This is problematic in certain environments: an empty filename may be illegal, or the default output path may not be writable (in the case where an empty filename would otherwise have some non-failing semantics). This patch switches to use Backend_EmitMCNull, which allows CodeGen to run, but does not attempt to create or write an output file. Differential Revision: http://reviews.llvm.org/D17405 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261252 91177308-0d34-0410-b5e6-96231b3b80d8
-
Krzysztof Parzyszek authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261251 91177308-0d34-0410-b5e6-96231b3b80d8
-
Devin Coughlin authored
It explains why we can't just synthesize bodies of setters in BodyFarm. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261248 91177308-0d34-0410-b5e6-96231b3b80d8
-
Nico Weber authored
http://reviews.llvm.org/D17397 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261247 91177308-0d34-0410-b5e6-96231b3b80d8
-
Devin Coughlin authored
When modeling a call to a setter for a property that is synthesized to be backed by an instance variable, don't invalidate the entire instance but rather only the storage for the updated instance variable itself. This still doesn't model the effect of the setter completely. It doesn't bind the set value to the ivar storage location because doing so would cause the set value to escape, removing valuable diagnostics about potential leaks of the value from the retain count checker. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261243 91177308-0d34-0410-b5e6-96231b3b80d8
-
Serge Pavlov authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261223 91177308-0d34-0410-b5e6-96231b3b80d8
-
Serge Pavlov authored
Llvm module object is shared between CodeGenerator and BackendConsumer, in both classes it is stored as std::unique_ptr, which is not a good design solution and can cause double deletion error. Usually it does not occur because in BackendConsumer::HandleTranslationUnit the ownership of CodeGenerator over the module is taken away. If however this method is not called, the module is deleted twice and compiler crashes. As the module owned by BackendConsumer is always the same as CodeGenerator has, pointer to llvm module can be removed from BackendGenerator. Differential Revision: http://reviews.llvm.org/D15450 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261222 91177308-0d34-0410-b5e6-96231b3b80d8
-