- Jul 27, 2016
-
-
John Brawn authored
This is causing a huge pile of buildbot failures. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276857 91177308-0d34-0410-b5e6-96231b3b80d8
-
John Brawn authored
Currently the Registry class contains the vestiges of a previous attempt to allow plugins to be used on Windows without using BUILD_SHARED_LIBS, where a plugin would have its own copy of a registry and export it to be imported by the tool that's loading the plugin. This only works if the plugin is entirely self-contained with the only interface between the plugin and tool being the registry, and in particular this conflicts with how IR pass plugins work. This patch changes things so that instead the add_node function of the registry is exported by the tool and then imported by the plugin, which solves this problem and also means that instead of every plugin having to export every registry they use instead LLVM only has to export the add_node functions. This allows plugins that use a registry to work on Windows if LLVM_EXPORT_SYMBOLS_FOR_PLUGINS is used. Differential Revision: http://reviews.llvm.org/D21385 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276856 91177308-0d34-0410-b5e6-96231b3b80d8
-
Oliver Stannard authored
Differential Revision: https://reviews.llvm.org/D22761 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276851 91177308-0d34-0410-b5e6-96231b3b80d8
-
Jonas Hahnfeld authored
This patch introduces a new cmake variable: CLANG_DEFAULT_RTLIB, thru which we can specify a default value for -rtlib (libgcc or compiler-rt) at build time, just like how we set the default C++ stdlib thru CLANG_DEFAULT_CXX_STDLIB. With these two options, we can configure clang to build binaries on Linux that have no runtime dependence on any gcc libs (libstdc++ or libgcc_s). Patch by Lei Zhang! Differential Revision: https://reviews.llvm.org/D22663 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276848 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jul 26, 2016
-
-
Artem Dergachev authored
This patch adds the CloneDetector class which allows searching source code for clones. For every statement or group of statements within a compound statement, CloneDetector computes a hash value, and finds clones by detecting identical hash values. This initial patch only provides a simple hashing mechanism that hashes the kind of each sub-statement. This patch also adds CloneChecker - a simple static analyzer checker that uses CloneDetector to report copy-pasted code. Patch by Raphael Isemann! Differential Revision: https://reviews.llvm.org/D20795 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276782 91177308-0d34-0410-b5e6-96231b3b80d8
-
Manman Ren authored
With PCH+Module, sometimes compiler gives a hard error: Module file ‘<some-file path>.pcm' is out of date and needs to be rebuilt This happens when we have a pch importing a module and the module gets overwritten by another compiler instance after we build the pch (one example is that both compiler instances hash to the same pcm file but use different diagnostic options). When we try to load the pch later on, the compiler notices that the imported module is out of date (modification date, size do not match) but it can't handle this out of date pcm (i.e it does not know how to rebuild the pch). This commit introduces a new command line option so for PCH + module, we can turn on this option and if two compiler instances only differ in diagnostic options, the latter instance will not invalidate the original pcm. rdar://26675801 Differential Revision: http://reviews.llvm.org/D22773 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276769 91177308-0d34-0410-b5e6-96231b3b80d8
-
Martin Bohme authored
This reverts commit r276755. (Broke clang-tidy check modernize-loop-convert.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276759 91177308-0d34-0410-b5e6-96231b3b80d8
-
Martin Bohme authored
Summary: Lambda capture initializations are part of the explicit source code and therefore should be visited by default but, so far, RecursiveASTVisitor does not visit them. This appears to be an oversight. Because the lambda body needs custom handling (calling TraverseLambdaBody()), the DEF_TRAVERSE_STMT for LambdaExpr sets ShouldVisitChildren to false but then neglects to visit the lambda capture initializations. This patch adds code to visit the expressions associated with lambda capture initializations. Reviewers: klimek Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D22566 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276755 91177308-0d34-0410-b5e6-96231b3b80d8
-
Kelvin Li authored
The OpenMP spec mandates that 'a teams construct must be contained within a target construct'. Currently, this scenario is not diagnosed. This patch is to add check for orphaned teams construct and issue an error message. Differential Revision: https://reviews.llvm.org/D22785 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276726 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jul 25, 2016
-
-
Alexander Kornienko authored
Summary: This patch moves the MPIFunctionClassifier header to `clang/include/clang/StaticAnalyzer/Checkers`, in order to make it accessible in other parts of the architecture. Reviewers: dcoughlin, zaks.anna Subscribers: alexfh, cfe-commits Patch by Alexander Droste! Differential Revision: https://reviews.llvm.org/D22671 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276639 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jul 23, 2016
-
-
Faisal Vali authored
Additionally, for pre-C++1z, instead of forbidding a lambda's closure type from being a literal type through circumlocutorily setting HasNonLiteralTypeFieldsOrBases falsely to true -- handle lambda's more directly in CXXRecordDecl::isLiteral(). One additional small step towards implementing constexpr-lambdas. Thanks to Richard Smith for his review! https://reviews.llvm.org/D22662 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276514 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
struct a bit bigger under MSVC (this shouldn't be a big deal; we typically allocate no more than two of these at a time, on the stack). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276509 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
'module' and 'import' as keywords when the flag is specified. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276508 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
decomposition declarations. There are a couple of things in the wording that seem strange here: decomposition declarations are permitted at namespace scope (which we partially support here) and they are permitted as the declaration in a template (which we reject). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276492 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jul 22, 2016
-
-
Vassil Vassilev authored
Processing update records (and loading a module, in general) might trigger unexpected calls to the ASTWriter (being a mutation listener). Now we have a mechanism to suppress those calls to the ASTWriter but notify other possible mutation listeners. Fixes https://llvm.org/bugs/show_bug.cgi?id=28332 Patch by Cristina Cristescu and me. Reviewed by Richard Smith (D21800). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276473 91177308-0d34-0410-b5e6-96231b3b80d8
-
Pirama Arumuga Nainar authored
Summary: This patch enables .rgba accessors to ext_vector_type types and adds tests for syntax validation and code generation. 'a' and 'b' can appear either in the point access mode or the numeric access mode (for indices 10 and 11). To disambiguate between the two usages, the accessor type is explicitly passed to relevant methods. Reviewers: rsmith Subscribers: Anastasia, bader, srhines, cfe-commits Differential Revision: http://reviews.llvm.org/D20602 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276455 91177308-0d34-0410-b5e6-96231b3b80d8
-
Devin Coughlin authored
This checker checks copy and move assignment operators whether they are protected against self-assignment. Since C++ core guidelines discourages explicit checking for `&rhs==this` in general we take a different approach: in top-frame analysis we branch the exploded graph for two cases, where &rhs==this and &rhs!=this and let existing checkers (e.g. unix.Malloc) do the rest of the work. It is important that we check all copy and move assignment operator in top frame even if we checked them already since self-assignments may happen undetected even in the same translation unit (e.g. using random indices for an array what may or may not be the same). This reapplies r275820 after fixing a string-lifetime issue discovered by the bots. A patch by Ádám Balogh! Differential Revision: https://reviews.llvm.org/D19311 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276365 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jul 21, 2016
-
-
Benjamin Kramer authored
No functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276292 91177308-0d34-0410-b5e6-96231b3b80d8
-
Kelvin Li authored
This patch is to implement sema and parsing for 'target simd' pragma. Differential Revision: https://reviews.llvm.org/D22479 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276203 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jul 20, 2016
-
-
Kelvin Li authored
OpenMP 4.5 removed the restriction that array section lower bound must be non negative. This change is to allow negative values for array section based on pointers. For array section based on array type there is still a restriction: "The array section must be a subset of the original array." Patch by David S. Differential Revision: https://reviews.llvm.org/D22481 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276177 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
we first touch any part of that module. Instead, defer them until the first time that module is (transitively) imported. The initializer step for a module then recursively initializes modules that its own headers imported. For example, this avoids running the <iostream> global initializer in programs that don't actually use iostreams, but do use other parts of the standard library. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276159 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276152 91177308-0d34-0410-b5e6-96231b3b80d8
-
Reid Kleckner authored
'ReusingBase' was a terrible name. It might actually refer to the most derived class, which is not a base. 'BaseWithVPtr' was also bad, since again, it could refer to the most derived class. It was actually the first base to introduce the vptr, so now it is 'IntroducingObject'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276120 91177308-0d34-0410-b5e6-96231b3b80d8
-
Simon Pilgrim authored
D20859 and D20860 attempted to replace the SSE (V)CVTTPS2DQ and VCVTTPD2DQ truncating conversions with generic IR instead. It turns out that the behaviour of these intrinsics is different enough from generic IR that this will cause problems, INF/NAN/out of range values are guaranteed to result in a 0x80000000 value - which plays havoc with constant folding which converts them to either zero or UNDEF. This is also an issue with the scalar implementations (which were already generic IR and what I was trying to match). This patch changes both scalar and packed versions back to using x86-specific builtins. It also deals with the other scalar conversion cases that are runtime rounding mode dependent and can have similar issues with constant folding. Differential Revision: https://reviews.llvm.org/D22105 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276102 91177308-0d34-0410-b5e6-96231b3b80d8
-
Hubert Tong authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276074 91177308-0d34-0410-b5e6-96231b3b80d8
-
Hubert Tong authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276073 91177308-0d34-0410-b5e6-96231b3b80d8
-
Hubert Tong authored
Summary: Space for storing the //constraint-expression// of the //requires-clause// associated with a `TemplateParameterList` is arranged by taking a bit out of the `NumParams` field for the purpose of determining whether there is a //requires-clause// or not, and by adding to the trailing objects tied to the `TemplateParameterList`. An accessor is provided. An appropriate argument is supplied to `TemplateParameterList::Create` at the various call sites. Serialization changes will addressed as the Concepts implementation becomes more solid. Drive-by fix: This change also replaces the custom `FixedSizeTemplateParameterListStorage` implementation with one that follows the interface provided by `llvm::TrailingObjects`. Reviewers: aaron.ballman, faisalv, rsmith Subscribers: cfe-commits, nwilson Differential Revision: https://reviews.llvm.org/D19322 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276069 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jul 19, 2016
-
-
Dmitry Polukhin authored
More info http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/14774/steps/check-clang%20msan/logs/stdio git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275974 91177308-0d34-0410-b5e6-96231b3b80d8
-
Dmitry Polukhin authored
It's a patch for PR28050. Seems like overloading resolution wipes out the first standard conversion sequence (before user-defined conversion) in case of deprecated string literal conversion. Differential revision: https://reviews.llvm.org/D21228 Patch by Alexander Makarov git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275970 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275925 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jul 18, 2016
-
-
Bruno Cardoso Lopes authored
Give incompatible function pointer warning its own diagnostic group but still leave it as a subgroup of incompatible-pointer-types. This is in preparation to promote -Wincompatible-function-pointer-types to error on darwin. Differential Revision: https://reviews.llvm.org/D22248 rdar://problem/12907612 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275907 91177308-0d34-0410-b5e6-96231b3b80d8
-
Vedant Kumar authored
Compute an effective target triple exactly once in ConstructJob(), and then simply pass around references to it. This eliminates wasteful re-computation of effective triples (e.g in getARMFloatABI()). Differential Revision: https://reviews.llvm.org/D22290 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275895 91177308-0d34-0410-b5e6-96231b3b80d8
-
Vedant Kumar authored
No in-tree targets access this `DefaultTargetTriple` directly, and usage of default triples is generally discouraged. Make the field private. This is part of en effort to make the clang driver use effective triples more pervasively. Differential Revision: https://reviews.llvm.org/D22289 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275894 91177308-0d34-0410-b5e6-96231b3b80d8
-
Mehdi Amini authored
Summary: Removed unused headers, replaced some headers with forward class declarations Patch by: Eugene <claprix@yandex.ru> Differential Revision: https://reviews.llvm.org/D20100 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275882 91177308-0d34-0410-b5e6-96231b3b80d8
-
Devin Coughlin authored
This reverts commit r275820. It is failing on the bots. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275880 91177308-0d34-0410-b5e6-96231b3b80d8
-
Reid Kleckner authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275826 91177308-0d34-0410-b5e6-96231b3b80d8
-
Devin Coughlin authored
This checker checks copy and move assignment operators whether they are protected against self-assignment. Since C++ core guidelines discourages explicit checking for `&rhs==this` in general we take a different approach: in top-frame analysis we branch the exploded graph for two cases, where &rhs==this and &rhs!=this and let existing checkers (e.g. unix.Malloc) do the rest of the work. It is important that we check all copy and move assignment operator in top frame even if we checked them already since self-assignments may happen undetected even in the same translation unit (e.g. using random indices for an array what may or may not be the same). A patch by Ádám Balogh! Differential Revision: https://reviews.llvm.org/D19311 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275820 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jul 16, 2016
-
-
Sean Silva authored
The flags: Enable IR-level instrumentation -fprofile-generate or -fprofile-generate= When applying profile data: -fprofile-use=/path/to/profdata Patch by Jake VanAdrighem! Differential Revision: https://reviews.llvm.org/D21823 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275668 91177308-0d34-0410-b5e6-96231b3b80d8
-
Erik Pilkington authored
This patch adds a new AST node: ObjCAvailabilityCheckExpr, and teaches the Parser and Sema to generate it. This node represents an availability check of the form: @available(macos 10.10, *); Which will eventually compile to a runtime check of the host's OS version. This is the first patch of the feature I proposed here: http://lists.llvm.org/pipermail/cfe-dev/2016-July/049851.html Differential Revision: https://reviews.llvm.org/D22171 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275654 91177308-0d34-0410-b5e6-96231b3b80d8
-
Samuel Antao authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275650 91177308-0d34-0410-b5e6-96231b3b80d8
-