- Jun 23, 2015
-
-
Alexander Kornienko authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@240353 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 22, 2015
-
-
Alexander Kornienko authored
The patch is generated using this command: $ tools/extra/clang-tidy/tool/run-clang-tidy.py -fix \ -checks=-*,llvm-namespace-comment -header-filter='llvm/.*|clang/.*' \ work/llvm/tools/clang To reduce churn, not touching namespaces spanning less than 10 lines. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@240270 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 19, 2015
-
-
Douglas Gregor authored
Adds a new warning (under -Wnullability-completeness) that complains about pointer, block pointer, or member pointer declarations that have not been annotated with nullability information (directly or inferred) within a header that contains some nullability annotations. This is intended to be used to help maintain the completeness of nullability information within a header that has already been audited. Note that, for performance reasons, this warning will underrepresent the number of non-annotated pointers in the case where more than one pointer is seen before the first nullability type specifier, because we're only tracking one piece of information per header. Part of rdar://problem/18868820. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@240158 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 04, 2015
-
-
Ahmed Bougacha authored
On ARM/AArch64, we currently always use EmitScalarExpr for the immediate builtin arguments, instead of directly emitting the constant. When the overflow sanitizer is enabled, this generates overflow intrinsics instead of constants, breaking assumptions in various places. Instead, use the knowledge of "immediates" to directly emit a constant: - teach the tablegen backend to emit the "immediate" modifiers - use those modifiers in the NEON CodeGen, on ARM and AArch64. Fixes PR23517. Differential Revision: http://reviews.llvm.org/D10045 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239002 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 03, 2015
-
-
Russell Gallop authored
Recognise options to output dependency files and don't perform checks. Report input file name when reporting a check failure so it is more obvious in large build logs. Differential Revision: http://reviews.llvm.org/D10183 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@238928 91177308-0d34-0410-b5e6-96231b3b80d8
-
Russell Gallop authored
Files compiled with -via-file-asm should be byte for byte identical. This change improves the checking on dash_s_no_change to detect non-code differences. If there is a difference, the check goes on to compare code and debug to try and be more informative. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@238926 91177308-0d34-0410-b5e6-96231b3b80d8
-
- May 29, 2015
-
-
Benjamin Kramer authored
If the type isn't trivially moveable emplace can skip a potentially expensive move. It also saves a couple of characters. Call sites were found with the ASTMatcher + some semi-automated cleanup. memberCallExpr( argumentCountIs(1), callee(methodDecl(hasName("push_back"))), on(hasType(recordDecl(has(namedDecl(hasName("emplace_back")))))), hasArgument(0, bindTemporaryExpr( hasType(recordDecl(hasNonTrivialDestructor())), has(constructExpr()))), unless(isInTemplateInstantiation())) No functional change intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@238601 91177308-0d34-0410-b5e6-96231b3b80d8
-
- May 15, 2015
-
-
Peter Collingbourne authored
Differential Revision: http://reviews.llvm.org/D9631 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@237463 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Apr 24, 2015
-
-
Craig Topper authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235698 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Apr 21, 2015
-
-
Ulrich Weigand authored
The GCC construct __attribute__((aligned)) is defined to set alignment to "the default alignment for the target architecture" according to the GCC documentation: The default alignment is sufficient for all scalar types, but may not be enough for all vector types on a target that supports vector operations. The default alignment is fixed for a particular target ABI. clang currently hard-coded an alignment of 16 bytes for that construct, which is correct on some platforms (including X86), but wrong on others (including SystemZ). Since this value is ABI-relevant, it is important to get correct for compatibility purposes. This patch adds a new TargetInfo member "DefaultAlignForAttributeAligned" that targets can set to the appropriate default __attribute__((aligned)) value. Note that I'm deliberately *not* using the existing "SuitableAlign" value, which is used to set the pre-defined macro __BIGGEST_ALIGNMENT__, since those two values may not be the same on all platforms. In fact, on X86, __attribute__((aligned)) always uses 16-byte alignment, while __BIGGEST_ALIGNMENT__ may be larger if AVX-2 or AVX-512 are supported. (This is actually not yet correctly implemented in clang either.) The patch provides a value for DefaultAlignForAttributeAligned only for SystemZ, and leaves the default for all other targets at 16, which means no visible change in behavior on all other targets. (The value is still wrong for some other targets, but I'd prefer to leave it to the target maintainers for those platforms to fix.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235397 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Apr 11, 2015
-
-
Benjamin Kramer authored
These add no value but can make a class non-trivially copyable. NFC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@234689 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alexander Kornienko authored
Summary: The patch is generated using clang-tidy misc-use-override check. This command was used: tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py \ -checks='-*,misc-use-override' -header-filter='llvm|clang' -j=32 -fix Reviewers: dblaikie Reviewed By: dblaikie Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D8926 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@234678 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Apr 10, 2015
-
-
Benjamin Kramer authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@234643 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Apr 06, 2015
-
-
James Dennett authored
Found by inspection. (No other instances of this problem were found.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@234221 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Apr 02, 2015
-
-
Russell Gallop authored
This is a tool for checking consistency of code generation with different compiler options (such as -g or outputting to .s). This tool has found a number of code generation issues. The script acts as a wrapper to clang or clang++ performing 2 (or more) compiles then comparing the object files. Instructions for use are in check_cfc.py including how to use with LNT. Differential Revision: http://reviews.llvm.org/D8723 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@233919 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Mar 19, 2015
-
-
Benjamin Kramer authored
We know all subclasses in tblgen so just generate a giant switch for the few virtual methods or turn them into a member variable using spare bits. The giant jump tables aren't pretty but still much smaller than a vtable for every attribute, shrinking Release+Asserts clang by ~400k. Also halves the size of the Attr base class. No functional change intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@232726 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Mar 18, 2015
-
-
Yaron Keren authored
Now that SmallString is a first-class citizen, most SmallString::str() calls are not required. This patch removes a whole bunch of them, yet there are lots more. There are two use cases where str() is really needed: 1) To use one of StringRef member functions which is not available in SmallString. 2) To convert to std::string, as StringRef implicitly converts while SmallString do not. We may wish to change this, but it may introduce ambiguity. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@232622 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Mar 10, 2015
-
-
Benjamin Kramer authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231811 91177308-0d34-0410-b5e6-96231b3b80d8
-
Aaron Ballman authored
The semantic spelling enumeration should retain values to the spelling list indexes used by the attribute. The only attribute affected by this in practice is the OpenCLImageAccessAttr, which has duplicate semantic spellings that are automatically stripped. We do not implicitly create an OpenCLImageAccessAttr, so this change only affects out of tree users. There is no way to test this behavior specifically that I can see, since this only affects implicit creation of attributes. Fixes PR22403. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231803 91177308-0d34-0410-b5e6-96231b3b80d8
-
Yaron Keren authored
Saves adding .str() call to any raw_ostream << SmallString usage and a small step towards making .str() consistent in the ADTs by removing one of the SmallString::str() use cases, discussion at http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20141013/240026.html I'll update the Phabricator patch http://reviews.llvm.org/D6372 for review of the Twine SmallString support, it's more complex than this one. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231763 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jan 23, 2015
-
-
Alexander Kornienko authored
http://reviews.llvm.org/D7090 Patch by Gábor Horváth! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226914 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jan 14, 2015
-
-
Chandler Carruth authored
No functionality changed, this is a purely mechanical cleanup to ensure the #include order remains consistent across the project. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225975 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Dec 19, 2014
-
-
Aaron Ballman authored
Attributes accepting an EnumArgument are allowed to pass a string literal, or an identifier. VariadicEnumArguments now behave consistently instead of only accepting a string literal. This change affects the only attribute accepting a variadic enumeration: callable_when. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@224582 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Dec 05, 2014
-
-
Aaron Ballman authored
Modify __has_attribute so that it only looks for GNU-style attributes. Removes the ability to look for generic attributes and keywords via this macro, which has the potential to be a breaking change. However, since there is __has_cpp_attribute and __has_declspec_attribute, and given the limited usefulness of querying a generic attribute name regardless of syntax, this seems like the correct path forward. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223468 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Nov 28, 2014
-
-
Sean Hunt authored
This attribute serves as a hint to improve warnings about the ranges of enumerators used as flag types. It currently has no working C++ implementation due to different semantics for enums in C++. For more explanation, see the docs and testcases. Reviewed by Aaron Ballman. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222906 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Nov 17, 2014
-
-
Aaron Ballman authored
Fixing a use of stringstream to use an LLVM helper function. Drive-by fixing header include order. NFC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222151 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Nov 14, 2014
-
-
Aaron Ballman authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222033 91177308-0d34-0410-b5e6-96231b3b80d8
-
Aaron Ballman authored
Complete support for the SD-6 standing document (based off N4200) with support for __has_cpp_attribute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221991 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Oct 31, 2014
-
-
Anna Zaks authored
Fixup to r220289. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220976 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Oct 30, 2014
-
-
Richard Smith authored
Instead of manually maintaining a flag indicating whether we're about to print out the last child of the parent node (to determine whether we print "`" or "|"), capture a callable to print that child and defer printing it until we either see a next child or finish the parent. No functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220930 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Oct 12, 2014
-
-
Tyler Nowicki authored
Previously loop hints such as #pragma loop vectorize_width(#) required a constant. This patch allows a constant expression to be used as well. Such as a non-type template parameter or an expression (2 * c + 1). Reviewed by Richard Smith git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219589 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Sep 15, 2014
-
-
Aaron Ballman authored
Adding some FIXMEs to the attribute emitter code regarding whether pretty printing enumerators should use quoted string literals, or identifiers. NFC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217781 91177308-0d34-0410-b5e6-96231b3b80d8
-
Aaron Ballman authored
When pretty printing attributes that have enumeration arguments, print the enumerator identifier (as a string literal) instead of the internal enumerator integral value. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217771 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Aug 27, 2014
-
-
Craig Topper authored
Simplify creation of a bunch of ArrayRefs by using None, makeArrayRef or just letting them be implicitly created. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@216528 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Aug 21, 2014
-
-
Daniel Sanders authored
Fix invalid test generation by utils/ABITest/ABITestGen.py when the same enum is generated more than once. When generating records/unions, the same enum type may be generated more than once (with different names). In these cases, the name of the enum values are not sufficiently unique to prevent multiple declarations. E.g: typedef enum T3 { enum0val0 } T3; typedef T3 T2[3]; typedef enum T4 { enum0val0 } T4; typedef union T1 { T2 field0; T4 field1; char field2; } T1; Added a unique suffix to enum values so that multiple identical enum types do not use the same enum value names. One example of this bug is produced by: ABITestGen.py --no-unsigned --no-vector --no-complex --no-bool \ --max-args 0 --max-record-depth 1 -o inputs/test.9921.a.c \ -T inputs/test.9921.b.c -D inputs/test.9921.driver.c \ --min=9921 --count=1 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@216166 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Aug 09, 2014
-
-
David Blaikie authored
This function might be a bit easier if it were split in two with a lot of early returns - and that setOptional bit in the outer function, but anyway. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215263 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Aug 08, 2014
-
-
Benjamin Kramer authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215202 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Aug 01, 2014
-
-
Aaron Ballman authored
The GNU-style aligned attribute has an optional expression, but the generated pretty printing logic was unaware of this. Fixed the pretty printing logic, and added a test to ensure it no longer asserts. Added a FIXME to the code about eliding the parenthesis when pretty printing such a construct. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214513 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jul 31, 2014
-
-
Aaron Ballman authored
Automate attribute argument count semantic checking when there are variadic or optional arguments present. With this, the only time you should have to manually check attribute argument counts is when HasCustomParsing is set to true, or when you have variadic arguments that aren't really variadic (like ownership_holds and friends). Updating the diagnostics in the launch_bounds test since they have been improved in that case. Adding a test for nonnull since it has little test coverage, but has truly variadic arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214407 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jul 16, 2014
-
-
Aaron Ballman authored
Specifying the diagnostic argument through the attribute table generator instead of having to enter it manually as part of the attribute subject list. This only affects attributes appertaining to ObjC interfaces and protocols. No new tests required as this is covered by existing tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213193 91177308-0d34-0410-b5e6-96231b3b80d8
-