Commit Graph

885 Commits

Author SHA1 Message Date
NAKAMURA Takumi c28a9a2c33 [CMake] Deprecate CLANG_RUNTIME_OUTPUT_INTDIR and CLANG_LIBRARY_OUTPUT_INTDIR.
LLVM_*_OUTPUT_INTDIR should be available everywhere. It was my mistake when I introduced INTDIR stuff.

llvm-svn: 199597
2014-01-19 13:00:01 +00:00
Alp Toker 96cf758d3a Fix comment typos
llvm-svn: 199563
2014-01-18 21:49:37 +00:00
Aaron Ballman 07c3d53c88 When generating Spelling enumeration values, do not generate identifiers in the reserved namespace. Strip underscores as appropriate, taking care to not create duplicate identifiers.
llvm-svn: 199414
2014-01-16 19:44:01 +00:00
Aaron Ballman 4755304fd1 Fixing a warning that causes the sanitizer build disliked about mixing && and ||. Since this is generated code, the && has been removed from the expression entirely.
llvm-svn: 199392
2014-01-16 14:32:03 +00:00
Aaron Ballman 12b9f6535b Factored some function-like type reasoning out of SemaDeclAttr and onto Decl itself. This allows for more declarative subjects in attribute tablegen where the attribute appertains to something function-like, but not strictly a FunctionDecl.
llvm-svn: 199387
2014-01-16 13:55:42 +00:00
Aaron Ballman 36a5350e51 Distinguish between attributes explicitly written at the request of the user, and attributes implicitly generated to assist in bookkeeping by the compiler. This is done so by table generating a CreateImplicit method for each attribute.
Additionally, remove the optional nature of the spelling list index when creating attributes. This is supported by table generating a Spelling enumeration when the spellings for an attribute are distinct enough to warrant it.

llvm-svn: 199378
2014-01-16 13:03:14 +00:00
Kostya Serebryany 317e2c499d replace LeakSanitizerIsTurnedOffForTheCurrentProcess with __lsan_is_turned_off, but this time hide it under __has_feature(address_sanitizer); also include <sanitizer/lsan_interface.h>
llvm-svn: 199303
2014-01-15 07:59:37 +00:00
Aaron Ballman 09e98ffa5b When determining the attribute's parsed kind, pay attention to the syntax used. This fixes bugs where an attribute has differing GNU and Declspec spellings, but they are treated as the same. Eg) __declspec(aligned) when it should be __attribute__((aligned)), and __attribute__((align)) when it should be __declspec(align).
llvm-svn: 199144
2014-01-13 21:42:39 +00:00
Kostya Serebryany a6afef7a51 reapply r198858: Disable LeakSanitizer in TableGen binaries, see PR18325; this time LeakSanitizerIsTurnedOffForTheCurrentProcess is used instead of __lsan_is_turned_off
llvm-svn: 198922
2014-01-10 08:05:42 +00:00
Aaron Ballman 0fa06d879a __has_attribute now understands target-specific attributes. So when you ask whether an ARM target has the "interrupt" attribute, it will return true for ARM and MSP430 targets, and false for others.
llvm-svn: 198897
2014-01-09 22:57:44 +00:00
Aaron Ballman ab7691c4ce Removing the notion of TargetAttributesSema and replacing it with one where the parsed attributes are responsible for knowing their target-specific nature, instead of letting Sema figure it out. This is necessary so that __has_attribute can eventually determine whether a parsed attribute applies to the given target or not.
llvm-svn: 198896
2014-01-09 22:48:32 +00:00
Alp Toker 96af9886ef Revert "Disable LeakSanitizer in TableGen binaries, see PR18325"
To declare or define reserved identifers is undefined behaviour in standard
C++. This needs to be addressed in compiler-rt before it can be used in LLVM.

See the list discussion for details.

This reverts commit r198858.

llvm-svn: 198885
2014-01-09 19:43:17 +00:00
Aaron Ballman 15b27b97b7 Removing a bit of custom parsing functionality used by the thread safety analysis APIs. Now using tablegen to determine whether an attribute's arguments should be parsed in an unevaluated context instead of relying on a separate, hard-coded list of attributes.
llvm-svn: 198883
2014-01-09 19:39:35 +00:00
Kostya Serebryany bc60254543 Disable LeakSanitizer in TableGen binaries, see PR18325
llvm-svn: 198858
2014-01-09 09:26:26 +00:00
Chandler Carruth 5553d0d4ca Sort all the #include lines with LLVM's utils/sort_includes.py which
encodes the canonical rules for LLVM's style. I noticed this had drifted
quite a bit when cleaning up LLVM, so wanted to clean up Clang as well.

llvm-svn: 198686
2014-01-07 11:51:46 +00:00
Aaron Ballman 0e468c02bc This helper method isn't needed, and it's unsafe for it to use StringRef in the first place. Replaced the unsafe code with the proper accessor.
llvm-svn: 198569
2014-01-05 21:08:29 +00:00
Douglas Gregor d1b760a670 CMake separate projects: finish output-directory changes.
Make sure clang-tblgen, clang++, and clang-cl get created in the Clang
binary build directory.

llvm-svn: 198331
2014-01-02 18:37:47 +00:00
DeLesley Hutchins bb79c338ed Update DataRecursiveASTVisitor so that it visits attributes.
llvm-svn: 198249
2013-12-30 21:03:02 +00:00
DeLesley Hutchins c4a82438a7 Update RecursiveASTVisitor so that it visits attributes. This is currently
important for thread safety attributes, which contain expressions that were
not being visited, and were thus invisible to various tools.  There are now
Visit*Attr methods that can be overridden for every attribute.

llvm-svn: 198224
2013-12-30 17:24:36 +00:00
Aaron Ballman 3e424b5070 Teach the diagnostics engine about the Attr type to make reporting on semantic attributes easier (and not require hard-coded strings). This requires a getSpelling() function on the Attr class, which is table-driven. Updates a handful of cases where a hard-coded string was being used to test the functionality out. Updating associated test cases for the improved quoting.
llvm-svn: 198055
2013-12-26 18:30:57 +00:00
Aaron Ballman aa47d24a47 Reverting r197715 -- it appears that MSVC is happy with the code, but clang is not.
llvm-svn: 197716
2013-12-19 19:39:25 +00:00
Aaron Ballman ced10529fe No longer leaking Argument objects after calling createArgument. However, since an OwningPtr cannot live in a std::vector yet, there are some manual deletions that have a FIXME attached to them. These will go away once C++11 support is allowed.
llvm-svn: 197715
2013-12-19 19:33:35 +00:00
Aaron Ballman e615393356 Removing the SourceLocation unused attribute argument type.
llvm-svn: 197707
2013-12-19 18:10:57 +00:00
Aaron Ballman 8edb5c2081 Refactor the Microsoft inheritance attribute handling so that it no longer has special treatment. Also fixes a minor bug where the attributes were being parsed as though they were GNU-style attributes when they were in fact keyword attributes.
llvm-svn: 197629
2013-12-18 23:44:18 +00:00
Aaron Ballman 64e6986e39 Allow target-specific attributes to share a spelling between different attributes via the ParseKind field. Attributes will be given a common parsed attribute identifier (the AttributeList::AT_* enum), but retain distinct Attr subclasses.
This new functionality is used to implement the ARM and MSP430 interrupt attribute.

Patch reviewed by Richard Smith over IRC.

llvm-svn: 197343
2013-12-15 13:05:48 +00:00
Ted Kremenek d980da2290 Enhance attribute machinery to include ObjCProtocols as "subjects" in attribute declarations.
llvm-svn: 196954
2013-12-10 19:43:42 +00:00
Kevin Qin fb79d7f843 [AArch64 NEON] Support poly128_t and implement relevant intrinsic.
llvm-svn: 196888
2013-12-10 06:49:01 +00:00
Ana Pazos 6a8b8b5f0d Implemented vget/vset_lane_f16 intrinsics
llvm-svn: 196535
2013-12-05 21:13:24 +00:00
Alp Toker d473363876 Correct hyphenations in comments and assert messages
This patch tries to avoid unrelated changes other than fixing a few
hyphen-related ambiguities in nearby lines.

llvm-svn: 196466
2013-12-05 04:47:09 +00:00
Aaron Ballman 00dcc43b56 Typo caught by Alp Toker: s/appertain/appertains
llvm-svn: 196273
2013-12-03 13:45:50 +00:00
Hao Liu a5246fde90 [AArch64]Add missing floating point convert, round and misc intrinsics.
E.g. int64x1_t vcvt_s64_f64(float64x1_t a) -> FCVTZS Dd, Dn

llvm-svn: 196211
2013-12-03 06:07:13 +00:00
Hao Liu 4b850c5e0d revert r196152.
This is a duplicate implementation.
E.g. this patch defines:
     float64_t vabd_f64(float64_t a, float64_t b)
But there is already a similar intrinsic "vabdd_f64" with the same types.
Also, this intrinsic will be conflicted to the vector type intrinsic as following(Which is implemented by me and will be committed to trunk):
     float64x1_t vabd_f64(float64x1_t a, float64x1_t b).
Two functions shouldn't have a same name in arm_neon.h.
According to ARM ACLE document, such vabd_f64 with float64_t is not existing.
So I revert this commit.

llvm-svn: 196205
2013-12-03 05:35:17 +00:00
Jiangning Liu cc1da2c938 Add some missing AArch64 Neon intrinsics like vmull_high_n_s16 and friends.
llvm-svn: 196189
2013-12-03 01:28:55 +00:00
Chad Rosier b0574f3bf7 [AArch64] Add missing NEON scalar floating-point to integer convert ACLEs.
llvm-svn: 196152
2013-12-02 21:07:24 +00:00
Aaron Ballman 93b5cc6db8 Rectifying style issues with generated code. No functional change intended.
llvm-svn: 196142
2013-12-02 19:36:42 +00:00
Aaron Ballman 3aff633590 Automate attribute language option checking by specifying the list of options to test in tablegen.
llvm-svn: 196138
2013-12-02 19:30:36 +00:00
Aaron Ballman 604dfec8dc Re-enabled support for the Subjects for the weak attribute. This changes the diagnostic involved to be more accurate -- for C++ code, it will now report that weak applies to variables, functions or classes. Added additional test case for this.
llvm-svn: 196120
2013-12-02 17:07:07 +00:00
Aaron Ballman a358c9051e Using the proper set key when determining whether a SubsetSubject helper method has been previously generated.
llvm-svn: 196103
2013-12-02 14:58:17 +00:00
Aaron Ballman 4cfafb9a85 Fixes a possible assert in the custom SubsetSubject logic for the attr emitter.
llvm-svn: 195962
2013-11-29 16:12:29 +00:00
Aaron Ballman 80469038c0 Enables support for custom subject lists for attributes. As a testbed, uses the custom subject for the ibaction attribute.
llvm-svn: 195960
2013-11-29 14:57:58 +00:00
Hao Liu 46a6ed9e64 AArch64: Two intrinsics are expected to return float64 not float32 in arm_neon.h
llvm-svn: 195943
2013-11-29 02:31:42 +00:00
Hao Liu 8a0099e02c Fix the problem that the range check for scalar narrow shift is too wide.
E.g. the immediate value of vshrns_n_s16 is [1,16], which should be [1,8].

llvm-svn: 195942
2013-11-29 02:13:17 +00:00
Aaron Ballman c1494bddc1 Renaming Struct to GenericRecord for clarity; could not use Record as the enumerant because that's already taken by the Record class.
llvm-svn: 195875
2013-11-27 20:14:30 +00:00
Aaron Ballman 17046b8506 Automated checking for C++ when determining what argument to send to the diagnostic for attribute subjects. In turn, this allows the Subjects to be enabled for some more attributes and improves diagnostics. Updated a test case based on the improved diagnostic.
llvm-svn: 195864
2013-11-27 19:16:55 +00:00
Jiangning Liu ee3e08799c Fix the AArch64 NEON bug exposed by checking constant integer argument range of ACLE intrinsics.
llvm-svn: 195844
2013-11-27 14:02:55 +00:00
Aaron Ballman 74eeeae3d3 Laying the basic groundwork for table generating the diagnostics for attribute subjects. This makes some modifications to the way subjects are listed in Attr.td, and updates the attr emitter to handle the new constructs.
I have disabled some attribute subject lines on purpose in Attr.td;
this part is a WIP with the goal being to restore those subjects
incrementally. By commenting them out, it leaves the original behavior
the same as before for those attributes and so those are not
functionality changes.

llvm-svn: 195841
2013-11-27 13:27:02 +00:00
Alp Toker 965f882588 Remove a whole lot of unused variables
There are about 30 removed in this patch, generated by a new FixIt I haven't
got round to submitting yet.

llvm-svn: 195814
2013-11-27 05:22:15 +00:00
Richard Smith 852e9ce3dd Remove 'DistinctSpellings' support from Attr.td and change its only user to
look at the attribute spelling instead. The 'ownership_*' attributes should
probably be split into separate *Attr classes, but that's more than I wanted to
do here.

llvm-svn: 195805
2013-11-27 01:46:48 +00:00
Tim Northover 5bb34ca4df ARM: define & use __ARM_NEON on ARM32 (as per ACLE)
There seem to be quite a few references to the old macro __ARM_NEON__ on the
internet, so I don't think it's a good idea to remove it entirely (at least
yet), but the canonical name does not have the trailing underscores so we
should use that ourselves.

llvm-svn: 195353
2013-11-21 12:36:34 +00:00
Ana Pazos 2b02688fd9 Implemented Neon scalar by element intrinsics.
Intrinsics implemented: vqdmull_lane, vqdmulh_lane, vqrdmulh_lane,
vqdmlal_lane, vqdmlsl_lane scalar Neon intrinsics.

llvm-svn: 195326
2013-11-21 07:36:33 +00:00
Aaron Ballman 18a7838e3e Implemented DefaultIntArgument in the table generator and start using it in semantic analysis. Removes some magic numbers.
llvm-svn: 195287
2013-11-21 00:28:23 +00:00
Jiangning Liu 3311f374a8 Add predicate for AArch64 crypto instructions.
llvm-svn: 195069
2013-11-19 01:38:19 +00:00
Jiangning Liu c8b0a1ad95 Clean up predefined macros for AArch64 to follow ACLE 2.0.
llvm-svn: 195068
2013-11-19 01:33:17 +00:00
Hao Liu 5e4ce1ae9d Implement the newly added AArch64 ACLE functions for ld1/st1 with 2/3/4 vectors.
The functions are like: vst1_s8_x2 ...

llvm-svn: 194991
2013-11-18 06:33:43 +00:00
Ana Pazos 6f2a47a9e5 Implemented aarch64 Neon scalar vmulx_lane intrinsics
Implemented aarch64 Neon scalar vfma_lane intrinsics
Implemented aarch64 Neon scalar vfms_lane intrinsics

Implemented legacy vmul_n_f64, vmul_lane_f64, vmul_laneq_f64
intrinsics (v1f64 parameter type) using Neon scalar instructions.

Implemented legacy vfma_lane_f64, vfms_lane_f64,
vfma_laneq_f64, vfms_laneq_f64 intrinsics (v1f64 parameter type)
using Neon scalar instructions.

llvm-svn: 194889
2013-11-15 23:33:31 +00:00
Kevin Qin caac85e612 [AArch64 neon] support poly64 and relevant intrinsic functions.
llvm-svn: 194660
2013-11-14 03:29:16 +00:00
Kevin Qin 1718af6f0a Implement aarch64 neon instruction class misc.
llvm-svn: 194657
2013-11-14 02:45:18 +00:00
Jiangning Liu 18b707cb3f Implement AArch64 NEON instruction set AdvSIMD (table).
llvm-svn: 194649
2013-11-14 01:57:55 +00:00
Dmitri Gribenko d9febeb884 Documentation parsing: add support for \throws \throw \exception commands
llvm-svn: 194521
2013-11-12 22:16:08 +00:00
Richard Smith 16e1b07597 Rather than duplicating extension diagnostics to allow them to cause a
substitution failure, allow a flag to be set on the Diagnostic object,
to mark it as 'causes substitution failure'.

Refactor Diagnostic.td and the tablegen to use an enum for SFINAE behavior
rather than a bunch of flags.

llvm-svn: 194444
2013-11-12 02:41:45 +00:00
Chad Rosier 249c714bb4 [AArch64] Add support for NEON scalar floating-point convert to fixed-point instructions.
llvm-svn: 194395
2013-11-11 18:04:22 +00:00
Jiangning Liu c628af66c7 Implement AArch64 Neon instruction set Perm.
llvm-svn: 194124
2013-11-06 03:35:53 +00:00
Kevin Qin 9eece7b5e0 Implemented aarch64 neon intrinsic vcopy_lane with float type.
llvm-svn: 194042
2013-11-05 02:05:44 +00:00
Aaron Ballman 4768b31797 Attributes which accept a type as their sole argument are no longer hard coded into the parser. Instead, they are automatically listed through tablegen.
llvm-svn: 193989
2013-11-04 12:55:56 +00:00
Richard Smith b87c465391 Store a TypeArgument on an attribute as a TypeSourceInfo*, rather than as a
QualType with a SourceLocation stashed alongside.

llvm-svn: 193803
2013-10-31 21:23:20 +00:00
Chad Rosier bdca387884 [AArch64] Add support for NEON scalar shift immediate instructions.
llvm-svn: 193791
2013-10-31 19:29:05 +00:00
Chad Rosier 4d55e6e0a4 [AArch64] Add support for NEON scalar floating-point compare instructions.
llvm-svn: 193692
2013-10-30 15:20:07 +00:00
Richard Smith 66e7168f8d PR17666: Instead of allowing an initial identifier argument in any attribute
which we don't think can't have one, only allow it in the tiny number of
attributes which opts into this weird parse rule.

I've manually checked that the handlers for all these attributes can in fact
cope with an identifier as the argument. This is still somewhat terrible; we
should move more fully towards picking the parsing rules based on the
attribute, and make the Parse -> Sema interface more type-safe.

llvm-svn: 193295
2013-10-24 01:07:54 +00:00
Chad Rosier 3c03dee1d1 [AArch64] Add support for NEON scalar extract narrow instructions.
llvm-svn: 192971
2013-10-18 14:03:36 +00:00
Kevin Qin f22bf50443 Implemented aarch64 SIMD copy related ACLE intrinsic :
vget_lane, vset_lane, vcopy_lane, vcreate, vdup_n, vdup_lane, vmov_n.

llvm-svn: 192411
2013-10-11 02:34:30 +00:00
Chad Rosier 0babda4b9c [AArch64] Add support for NEON scalar signed/unsigned integer to floating-point
convert instructions.

llvm-svn: 192232
2013-10-08 20:43:46 +00:00
Jiangning Liu b96ebac02b Implement aarch64 neon instruction set AdvSIMD (Across).
llvm-svn: 192029
2013-10-05 08:22:55 +00:00
DeLesley Hutchins 210791a021 Consumed Analysis: Change callable_when so that it can take a list of states
that a function can be called in.  This reduced the total number of annotations
needed and makes writing more complicated behaviour less burdensome.
Patch by chriswails@gmail.com.

llvm-svn: 191983
2013-10-04 21:28:06 +00:00
Jiangning Liu 4617e9dc85 Implement aarch64 neon instruction set AdvSIMD (3V elem).
llvm-svn: 191945
2013-10-04 09:21:17 +00:00
Aaron Ballman 682ee42550 Tablegen now generates a StringSwitch for attributes containing enumeration arguments to map strings to the proper enumeration value. This makes error checking more consistent and reduces the amount of hand-written code required.
llvm-svn: 190545
2013-09-11 19:47:58 +00:00
Aaron Ballman c12aaff2cb The cleanup attribute no longer uses an unresolved, simple identifier as its argument. Instead, it takes an expression that is fully resolved.
llvm-svn: 190476
2013-09-11 01:37:41 +00:00
Aaron Ballman 8ee40b7264 Attribute tablegen now understands that attribute arguments can be optional. This allows for automated checking of the number of arguments expected vs number of arguments given for attributes. Greatly reduces the amount of manual checking required.
llvm-svn: 190368
2013-09-09 23:33:17 +00:00
Benjamin Kramer 60509af49a Fix constructor-related typos.
Noticed by Roman Divacky.

llvm-svn: 190311
2013-09-09 14:48:42 +00:00
Jiangning Liu 1bda93a252 Implement aarch64 neon instruction set AdvSIMD (3V Diff), covering the following 26 instructions,
SADDL, UADDL, SADDW, UADDW, SSUBL, USUBL, SSUBW, USUBW, ADDHN, RADDHN, SABAL, UABAL, SUBHN, RSUBHN, SABDL, UABDL, SMLAL, UMLAL, SMLSL, UMLSL, SQDMLAL, SQDMLSL, SMULL, UMULL, SQDMULL, PMULL

llvm-svn: 190289
2013-09-09 02:21:08 +00:00
Jordan Rose 7bd9186cdd [analyzer] SATestBuild: strip trailing newlines from command file.
When running a make-based command, SATestBuild tries to append a -jN flag
with an appropriate N to run the build in parallel. However, it failed
to take into account that each line read includes a trailing newline
(unless it is the last line of a file without a trailing newline), which
resulted in the "-jN" appearing on a line on its own.

llvm-svn: 190164
2013-09-06 16:12:41 +00:00
Hao Liu b1852eed38 Inplement aarch64 neon instructions in AdvSIMD(shift). About 24 shift instructions:
sshr,ushr,ssra,usra,srshr,urshr,srsra,ursra,sri,shl,sli,sqshlu,sqshl,uqshl,shrn,sqrshr$
 and 4 convert instructions:
      scvtf,ucvtf,fcvtzs,fcvtzu

llvm-svn: 189926
2013-09-04 09:29:13 +00:00
Aaron Ballman f58070baed Switched FormatAttr to using an IdentifierArgument instead of a StringArgument since that is a more accurate modeling.
llvm-svn: 189851
2013-09-03 21:02:22 +00:00
Kevin Qin c076d0682b mangle aarch64 Neon ACLE scalar instrinsic name with BHSD suffix.
llvm-svn: 189574
2013-08-29 07:55:15 +00:00
Craig Topper da7cf8ab2b Move individual group name strings from the OptionTable into one big char array. Then only store offsets into it in the OptionTable. Saves about 4K from the clang binary and removes 400 relocation entries from DiagnosticIDs.o.
llvm-svn: 189568
2013-08-29 05:18:04 +00:00
Craig Topper a3891a7568 Reorder and shrink size of NameLen field in diagnostic group table. Shaves ~4K from clang binary.
llvm-svn: 189445
2013-08-28 06:01:10 +00:00
Craig Topper d80c17e060 Merge diagnostic group tables to reduce data size and relocation entries.
The individual group and subgroups tables are now two large tables. The option table stores an index into these two tables instead of pointers. This reduces the size of the options tabe since it doesn't need to store pointers. It also reduces the number of relocations needed.

My build shows this reducing DiagnosticsIDs.o and the clang binary by ~20.5K. It also removes ~400 relocation entries from DiagnosticIDs.o.

llvm-svn: 189438
2013-08-28 04:02:50 +00:00
Rafael Espindola d3f8b1f2b1 clang-format utils/TableGen/TableGen.cpp.
I have a patch that edits the file. Running clang-format first makes the patch
a lot easier to review.

llvm-svn: 188562
2013-08-16 16:46:27 +00:00
Hao Liu 4efa1402fe Clang and AArch64 backend patches to support shll/shl and vmovl instructions and ACLE functions
llvm-svn: 188452
2013-08-15 08:26:30 +00:00
Tim Northover 2fe823a6c3 AArch64: initial NEON support
Patch by Ana Pazos

- Completed implementation of instruction formats:
AdvSIMD three same
AdvSIMD modified immediate
AdvSIMD scalar pairwise

- Completed implementation of instruction classes
(some of the instructions in these classes
belong to yet unfinished instruction formats):
Vector Arithmetic
Vector Immediate
Vector Pairwise Arithmetic

- Initial implementation of instruction formats:
AdvSIMD scalar two-reg misc
AdvSIMD scalar three same

- Intial implementation of instruction class:
Scalar Arithmetic

- Initial clang changes to support arm v8 intrinsics.
Note: no clang changes for scalar intrinsics function name mangling yet.

- Comprehensive test cases for added instructions
To verify auto codegen, encoding, decoding, diagnosis, intrinsics.

llvm-svn: 187568
2013-08-01 09:23:19 +00:00
Aaron Ballman 080cad730a Fixing an unused variable warning.
llvm-svn: 187474
2013-07-31 02:20:22 +00:00
Aaron Ballman 0979e9e130 Added the notion of Type and TargetSpecific attributes to the clang tablegen. In turn, this fixes a mistake with Ptr32, Ptr64, UPtr and SPtr attribtues generating AST nodes that are never actually used.
llvm-svn: 187401
2013-07-30 01:44:15 +00:00
Craig Topper a9bcac5825 Const-correct some iterators. No functional change.
llvm-svn: 186797
2013-07-21 22:20:10 +00:00
Craig Topper f3932e3355 Remove trailing whitespace
llvm-svn: 186722
2013-07-19 21:43:59 +00:00
Michael Gottesman 1169a52c83 [NeonIntrinsicTestEmitter] vld1/vst1 do not require the :64 hint.
llvm-svn: 184786
2013-06-24 21:25:39 +00:00
Michael Gottesman c6b5e56c19 [NeonIntrinsicTestEmitter] Fix incorrect FileCheck pattern where we were expecting a ',' prefix to alignment hints.
llvm-svn: 184785
2013-06-24 21:25:37 +00:00
Michael Gottesman d95c49a91c [NeonIntrinsicTestEmitter] Add requirement to arm neon intrinsic tests for the feature long_tests.
This will prevent the tests from running on normal make check. You will need to
actually pass in --param run_long_tests=true to LIT in order to run these.

llvm-svn: 184784
2013-06-24 21:25:34 +00:00
Reid Kleckner 5d0708893d Remove option emitter from clang-tblgen
The CMake build was still using it because I forgot to s/CLANG/LLVM/ in
the tablegen() call.  The Makefile build is already using llvm-tblgen.

llvm-svn: 184192
2013-06-18 15:25:00 +00:00
Jordan Rose c7b992edcf [analyzer] SATestBuild: Don't require reference results to have logs.
The Logs directory isn't used for testing, so it's filtered out ahead of
time. However, there's then no reason to include it in version control at
all. Don't error if it's not present.

llvm-svn: 183689
2013-06-10 19:34:30 +00:00
Anna Zaks 7b4f8a4181 [analyzer] Always use ccc-analyzer when running scan-build on buildbot
llvm-svn: 182982
2013-05-31 02:31:09 +00:00
Richard Smith 82f3fc06d3 Increase the portability of this script a bit: use /usr/bin/env to find bash,
rather than assuming it lives in the path. Patch by Eitan Adler!

llvm-svn: 182696
2013-05-24 23:54:21 +00:00
Jim Grosbach d10f1c04aa ARM: Improve codegen for vget_low_* and vget_high_ intrinsics.
These intrinsics use the __builtin_shuffle() function to extract the
low and high half, respectively, of a 128-bit NEON vector. Currently,
they're defined to use bitcasts to simplify the emitter, so we get code
like:
uint16x4_t vget_low_u32(uint16x8_t __a) {
  return (uint32x2_t) __builtin_shufflevector((int64x2_t) __a,
                                              (int64x2_t) __a,
                                              0);
}

While this works, it results in those bitcasts going all the way through
to the IR, resulting in code like:
  %1 = bitcast <8 x i16> %in to <2 x i64>
  %2 = shufflevector <2 x i64> %1, <2 x i64> undef, <1 x i32>
  %zeroinitializer
  %3 = bitcast <1 x i64> %2 to <4 x i16>

We can instead easily perform the operation directly on the input vector
like:

uint16x4_t vget_low_u16(uint16x8_t __a) {
  return __builtin_shufflevector(__a, __a, 0, 1, 2, 3);
}

Not only is that much easier to read on its own, it also results in
cleaner IR like:

  %1 = shufflevector <8 x i16> %in, <8 x i16> undef,
                     <4 x i32> <i32 0, i32 1, i32 2, i32 3>

This is both easier to read and easier for the back end to reason
about effectively since the operation is obfuscating the source with
bitcasts.

rdar://13894163

llvm-svn: 181865
2013-05-15 02:40:04 +00:00
Reid Kleckner 4290361b99 Fix copy-pasto in naming of LAST_MS_INHERITANCE[_ATTR]
Richard Smith pointed this out over a month ago.

llvm-svn: 181830
2013-05-14 20:55:49 +00:00
Dmitri Gribenko 010316ce34 ArrayRef<T>() -> None cleanup
llvm-svn: 181140
2013-05-05 01:03:47 +00:00
Douglas Gregor 231ca1c929 Restore Richard's belief in me.
llvm-svn: 181042
2013-05-03 18:51:59 +00:00
Douglas Gregor d2472d4cdb Use attribute argument information to determine when to parse attribute arguments as expressions.
This change partly addresses a heinous problem we have with the
parsing of attribute arguments that are a lone identifier. Previously,
we would end up parsing the 'align' attribute of this as an expression
"(Align)":

 template<unsigned Size, unsigned Align>
 class my_aligned_storage
 {
   __attribute__((align((Align)))) char storage[Size];
 };

while this would parse as a "parameter name" 'Align':

 template<unsigned Size, unsigned Align>
 class my_aligned_storage
 {
   __attribute__((align(Align))) char storage[Size];
 };

The code that handles the alignment attribute would completely ignore
the parameter name, so the while the first of these would do what's
expected, the second would silently be equivalent to

 template<unsigned Size, unsigned Align>
 class my_aligned_storage
 {
   __attribute__((align)) char storage[Size];
 };

i.e., use the maximal alignment rather than the specified alignment.

Address this by sniffing the "Args" provided in the TableGen
description of attributes. If the first argument is "obviously"
something that should be treated as an expression (rather than an
identifier to be matched later), parse it as an expression.

Fixes <rdar://problem/13700933>.

llvm-svn: 180973
2013-05-02 23:25:32 +00:00
Douglas Gregor 33ebfe36e5 Revert r180970; it's causing breakage.
llvm-svn: 180972
2013-05-02 23:15:45 +00:00
Douglas Gregor 44dff3f2dc Use attribute argument information to determine when to parse attribute arguments as expressions.
This change partly addresses a heinous problem we have with the
parsing of attribute arguments that are a lone identifier. Previously,
we would end up parsing the 'align' attribute of this as an expression
"(Align)":

  template<unsigned Size, unsigned Align>
  class my_aligned_storage
  {
    __attribute__((align((Align)))) char storage[Size];
  };

while this would parse as a "parameter name" 'Align':

  template<unsigned Size, unsigned Align>
  class my_aligned_storage
  {
    __attribute__((align(Align))) char storage[Size];
  };

The code that handles the alignment attribute would completely ignore
the parameter name, so the while the first of these would do what's
expected, the second would silently be equivalent to

  template<unsigned Size, unsigned Align>
  class my_aligned_storage
  {
    __attribute__((align)) char storage[Size];
  };

i.e., use the maximal alignment rather than the specified alignment.

Address this by sniffing the "Args" provided in the TableGen
description of attributes. If the first argument is "obviously"
something that should be treated as an expression (rather than an
identifier to be matched later), parse it as an expression.

Fixes <rdar://problem/13700933>.

llvm-svn: 180970
2013-05-02 23:08:12 +00:00
Michael Gottesman 3508389233 [neonemitter tests] Change triple of emitted tests to thumbv7s to match the target cpu being swift. Also specify the target-abi to apcs-gnu.
llvm-svn: 180233
2013-04-25 00:10:14 +00:00
Michael Gottesman 6cd3e560fd [6/6] ARM Neon Intrinsic Tablegen Test Generator.
Added GenerateChecksForIntrinsic method to generate FileCheck patterns
for generated arm neon tests.

Reviewed by Bob Wilson.

llvm-svn: 179644
2013-04-16 23:00:26 +00:00
Michael Gottesman 1d712fe52d [5/6] ARM Neon Intrinsic Tablegen Test Generator.
Changed the test generation target cpu type from cortex-a9 to swift.

Reviewed by Bob Wilson.

llvm-svn: 179642
2013-04-16 22:55:01 +00:00
Michael Gottesman d44c8f7d20 [4/6] ARM Neon Intrinsic Tablegen Test Generator.
Added code to NeonEmitter::runTests so that GenTest gets all of the needed
arguments to invoke the neon test generation methods.

Reviewed by Bob Wilson.

llvm-svn: 179640
2013-04-16 22:48:52 +00:00
Michael Gottesman 095c58f1c4 [3/6] ARM Neon Intrinsic Tablegen Test Generator.
Refactored out the method InstructionTypeCode from MangleName for use in
further patches which perform neon tablegen test generation.

Reviewed by Bob Wilson.

llvm-svn: 179636
2013-04-16 22:07:30 +00:00
Michael Gottesman fc89cc2a91 [2/6] ARM Neon Intrinsic Tablegen Test Generator.
This patch causes OpInst records to be silently identified with their Non-Op
inst counterparts so that the same test generation infrastructure can be used to
generate tests.

Reviewed by Bob Wilson.

llvm-svn: 179628
2013-04-16 21:18:42 +00:00
Bob Wilson 2b59395d0e Define Neon intrinsics as "static inline" to avoid warning. rdar://13108414
We had been defining Neon intrinsics as "static" with always_inline attributes.
If you use them from an extern inline function, you get a warning, e.g.:

static function 'vadd_u8' is used in an inline function with external linkage

This change simply adds the inline keyword to avoid that warning.

llvm-svn: 179406
2013-04-12 20:17:20 +00:00
Fariborz Jahanian 745bf62d21 doce parsing: adding few more headerdoc tags.
// rdar://12379114

llvm-svn: 178903
2013-04-05 19:40:53 +00:00
Jordan Rose 10ad081fc6 [analyzer] Re-enable cplusplus.NewDelete (but not NewDeleteLeaks).
As mentioned in the previous commit message, the use-after-free and
double-free warnings for 'delete' are worth enabling even while the
leak warnings still have false positives.

llvm-svn: 178891
2013-04-05 17:55:07 +00:00
Anton Yartsev 01acbcebbb [analyzer] Moving cplusplus.NewDelete to alpha.* for now.
llvm-svn: 178529
2013-04-02 05:59:24 +00:00
Reid Kleckner 6a476082a6 [ms-cxxabi] Give the MS inheritance attributes a base class
Required making a handful of changes to the table generator.  Also adds
an unspecified inheritance attribute.  This opens the path for us to
apply these attributes to C++ records implicitly.

llvm-svn: 178054
2013-03-26 18:30:28 +00:00
Anton Yartsev 13df03624b [analyzer] Adds cplusplus.NewDelete checker that check for memory leaks, double free, and use-after-free problems of memory managed by new/delete.
llvm-svn: 177849
2013-03-25 01:35:45 +00:00
Jordan Rose b042cc7822 [analyzer] CmpRuns.py: Accept single files as input.
This allows us to compare two direct invocations of the analyzer on a
single source file without having to wrap the output plists in their
own directories.

llvm-svn: 177804
2013-03-23 01:21:26 +00:00
Fariborz Jahanian cfbac5d317 Documentation parsing. Some refactoring and code
improvements per Dmtiri's comments. // rdar://12379114

llvm-svn: 176739
2013-03-08 23:59:23 +00:00
Fariborz Jahanian a649eee9e8 HeaderDoc: Support more of HeaderDoc documentation
commands; top level tags such as @interface and
their 2nd level tags such as @coclass, etc.
// rdar://12379114

llvm-svn: 176667
2013-03-07 23:33:11 +00:00
Fariborz Jahanian 8a7a59226d doc parsing. We want to issue a strong warning when
an @function comment is not followed by a function decl.
// rdar://13094352

llvm-svn: 176468
2013-03-05 01:05:07 +00:00
Ted Kremenek 0332558894 Strip 'llvm' from 'llvm::Optional' uses.
llvm-svn: 175701
2013-02-21 01:29:01 +00:00
Dmitri Gribenko 2e72dd4a43 Comment parsing: improve the fidelity of XML output for many block commands
This change introduces a 'kind' attribute for the <Para> tag, that captures the
kind of the parent block command.

For example:

\todo Meow.

used to be just <Para>Meow.</Para>, but now it is
<Para kind="todo">Meow.</Para>

llvm-svn: 174216
2013-02-01 20:23:57 +00:00
Michael Han af02bbe84f [Sema][Attr]Fix alignment attribute printing.
Remove "IsMSDeclspec" argument from Align attribute since the arguments in Attr.td should
only model those appear in source code. Introduce attribute Accessor, and teach TableGen
to generate syntax kind accessors for Align attribute, and use those accessors to decide
if an alignment attribute is a declspec attribute.

llvm-svn: 174133
2013-02-01 01:19:17 +00:00
Fariborz Jahanian 1a0cf80533 [Comment parsing] Add support for recognizing
\headerfile command and representing it in an xml
document. Patch reviewed by Dmitri Gribenko.
// rdar://12397511

llvm-svn: 174109
2013-01-31 23:12:39 +00:00
Richard Trieu de5cc7d3d8 Add indents to AST dumping and removed parenthesis from AST nodes.
Indents were given the color blue when outputting with color.
AST dumping now looks like this:

Node
|-Node
| `-Node
`-Node
  `-Node

Compared to the previous:

(Node
  (Node
    (Node))
  (Node
    (Node)))

llvm-svn: 174022
2013-01-31 01:44:26 +00:00
Dmitri Gribenko 6b11fca83a TableGen backends: use emitSourceFileHeader() to emit the warning about
file contents being autogenerated

llvm-svn: 173979
2013-01-30 21:54:20 +00:00
Dmitri Gribenko 28800da1b3 Comment parsing: resolve more named character references
This reimplements r173850 with a better approach:
(1) use a TableGen-generated matcher instead of doing a linear search;
(2) avoid allocations for new strings by converting code points to string
    iterals with TableGen.

llvm-svn: 173931
2013-01-30 14:29:28 +00:00
Richard Smith a5aaca9295 Propagate the spelling list index for an attribute across template instantiation.
llvm-svn: 173768
2013-01-29 04:21:28 +00:00
Richard Smith 0cdcc98200 Replace AS_MSTypespec with AS_Keyword, for representing any attribute spelled
as a keyword. Rationalize existing attributes to use it as appropriate, and to
not lie about some __declspec attributes being GNU attributes. In passing,
remove a gross hack which was discarding attributes which we could handle. This
results in us actually respecting the __pascal keyword again.

llvm-svn: 173746
2013-01-29 01:24:26 +00:00
Michael Han 38d96ab6f5 Add the missing line return to align parameters of printPretty.
llvm-svn: 173597
2013-01-27 00:06:24 +00:00
Daniel Dunbar 96568f91cd [utils] Kill another no-longer-useful utility script.
- We are long past the days of getting clang to fail in mass on swaths of code,
   fortunately.

llvm-svn: 173523
2013-01-25 23:12:17 +00:00
Daniel Dunbar 23af2b1a2c [utils] Remove the OptionalTests subdir no one runs.
llvm-svn: 173491
2013-01-25 21:12:20 +00:00
Daniel Dunbar e462e0f665 [utils] Remove C++Tests that I don't think anyone uses anymore.
llvm-svn: 173490
2013-01-25 21:12:17 +00:00
Jordan Rose b18179da33 scan-build: Add a --keep-empty option for better testing.
SATestBuild expects to compare output directories for each invocation of
scan-build that it runs, but scan-build clears out empty directories by
default. We were coincidentally not getting that behavior until r173294.

llvm-svn: 173383
2013-01-24 23:07:59 +00:00
Michael Han 9931593299 PR14922: when printing an attribute, use the real syntax of the attribute (GNU, C++11, MS Declspec) instead of hardcoded GNU syntax.
Introduce a spelling index to Attr class, which is an index into the attribute spelling list of an attribute defined in Attr.td. 
This index will determine the actual spelling used by an attribute, as it incorporates both the syntax and naming of the attribute.
When constructing an attribute AST node, the spelling index is computed based on attribute kind, scope (if it's a C++11 attribute), and
name, then passed to Attr that will use the index to print itself. 

Thanks to Richard Smith for the idea and review.

llvm-svn: 173358
2013-01-24 16:46:58 +00:00
NAKAMURA Takumi a34792085c clang/utils/valgrind/x86_64-pc-linux-gnu_gcc-4.3.3.supp: Add /usr/bin/cmp.
FIXME: It could be removed if;

  - check-all included llvm/valgrind/supp, too.
  - clang-vg didn't use "check-all".

llvm-svn: 172982
2013-01-20 15:30:41 +00:00
Benjamin Kramer e2e6e6a3d5 Turns out there is a simpler way of getting a set difference in bash than parsing diff output.
llvm-svn: 172420
2013-01-14 15:00:48 +00:00
Benjamin Kramer 6590abb384 Speed up find-unused-diagnostics. Now runs in less than a second instead of more than a minute.
llvm-svn: 172330
2013-01-12 21:39:06 +00:00
Dmitri Gribenko f857950d39 Remove useless 'llvm::' qualifier from names like StringRef and others that are
brought into 'clang' namespace by clang/Basic/LLVM.h

llvm-svn: 172323
2013-01-12 19:30:44 +00:00
Jordan Rose c3b23aa848 Error if an anonymous DiagGroup is referenced multiple times.
Not only is this inefficient for TableGen, it's annoying for maintenance
when renaming warning flags (unusual) or adding those flags to a group
(more likely).

This uses the new fix-it infrastructure for LLVM's SourceMgr/SMDiagnostic,
as well as a few changes to TableGen to track more source information.

llvm-svn: 172087
2013-01-10 18:50:46 +00:00
Argyrios Kyrtzidis 9f89bffc25 [utils/ClangDataFormat.py] Don't use lldb.frame directly, get the frame from the value.
Some lldb changes made lldb.frame not set until a script is invoked, which made the
formatters not working after a restart.

llvm-svn: 172017
2013-01-09 23:22:08 +00:00
Alexander Kornienko 9569c7625a Fixed a number of -Wcovered-switch-default diagnostics in tools/clang/include/clang/AST/AttrDump.inc
llvm-svn: 171768
2013-01-07 19:09:15 +00:00
Alexander Kornienko 5bc364eb05 Implement Attr dumping for -ast-dump.
http://llvm-reviews.chandlerc.com/D234

Patch by Philip Craig!

llvm-svn: 171760
2013-01-07 17:53:08 +00:00
Chandler Carruth 59ff16cf74 Sort the #include lines under utils/...
llvm-svn: 169245
2012-12-04 09:53:39 +00:00
Jordan Rose 64e4cf001b [analyzer] SATestBuild.py: allow make builds to disable parallelization
Before, SATestBuild unilaterally added '-j<n>' to every project built with
'make'. Now, we check and see if there's a -j option already specified, which
allows a project to explicitly be marked '-j1'.

llvm-svn: 168603
2012-11-26 19:59:57 +00:00
Jordan Rose 8832924acb [analyzer] SATestBuild.py: fix broken string concatenation
This has been broken for a while, but the branch was never being taken.
(We were trying to do 'str + floatVal'; now we do 'str % intVal' and use
the '%d' format.)

llvm-svn: 168174
2012-11-16 17:41:21 +00:00
Argyrios Kyrtzidis 71c81b63bc [ClangDataFormat.py] Add summary for QualType.
llvm-svn: 168117
2012-11-16 00:25:26 +00:00
Anna Zaks fab9bb6890 [analyzer] CmpRuns: move the clang_version info into the run (out of
report)

llvm-svn: 168105
2012-11-15 22:42:44 +00:00
Jordan Rose f477505d03 [analyzer] SATestBuild.py: correctly add -j option for projects using make.
llvm-svn: 168099
2012-11-15 22:03:53 +00:00
Argyrios Kyrtzidis ec1594a7b5 [utils/ClangDataFormat.py] For invalid source locations just return
"<invalid loc>" for summary.

llvm-svn: 168087
2012-11-15 20:59:00 +00:00
Argyrios Kyrtzidis a660ae4421 [PCH] Reading expressions from attributes should be done using ReadExpr(),
not ReadExpr().

Also add a test case making sure the thread safety attributes work as expected
when they come from a PCH.

Fixes rdar://12584141 & http://llvm.org/PR13982

llvm-svn: 168017
2012-11-15 01:31:39 +00:00
Argyrios Kyrtzidis a19a126ee3 [utils/ClangDataFormat.py] Add data formatter for StringRef.
llvm-svn: 168003
2012-11-14 23:52:19 +00:00
Argyrios Kyrtzidis a3caaf3a05 [utils/ClangDataFormat.py] In the summary of SourceLocation, include whether it is
local or loaded.

llvm-svn: 168002
2012-11-14 23:52:11 +00:00
Eric Christopher fd081ca50a Remove the cellspu port.
Approved by Chris Lattner.

llvm-svn: 167983
2012-11-14 22:08:59 +00:00
Anna Zaks 9821e57c09 [analyzer] Ensure that CmpRuns recursively walks the output directory.
llvm-svn: 167981
2012-11-14 21:32:16 +00:00
Argyrios Kyrtzidis 069a2df6fd Remove leftover code.
llvm-svn: 167641
2012-11-09 23:02:10 +00:00
Argyrios Kyrtzidis 32f1764d65 Add lldb data formatters for clang classes, starting with SourceLocation.
When installed, instead of getting this:

(lldb) p Tok.Loc
(clang::SourceLocation) $0 = {
  (unsigned int) ID = 123582
}

you'll get:

(lldb) p Tok.Loc
(clang::SourceLocation) $4 = "/usr/include/i386/_types.h:37:1" (offset: 123582, file)

This depends on r167629.

llvm-svn: 167640
2012-11-09 22:59:01 +00:00
Anna Zaks 69e2bf9e0c [analyzer] Test SimpleStream on the buildbot.
llvm-svn: 167317
2012-11-02 21:30:07 +00:00
Joerg Sonnenberger ee1f31ebea Don't require exception handling for clang-tblgen.
llvm-svn: 166713
2012-10-25 20:34:00 +00:00
Joerg Sonnenberger 691a16b444 Don't throw exceptions in clang-tblgen by switching to PrintFatalError.
Add locations in a number of places, where they are available for free.

llvm-svn: 166691
2012-10-25 16:37:08 +00:00
Michael J. Spencer 929fccd476 [Options] Add prefixes to options.
Each option has a set of prefixes. When matching an argument such as
-funroll-loops. First the leading - is removed as it is a prefix. Then
a lower_bound search for "funroll-loops" is done against the option table by
option name. From there each option prefix + option name combination is tested
against the argument.

This allows us to support Microsoft style options where both / and - are valid
prefixes. It also simplifies the cases we already have where options come in
both - and -- forms. Almost every option for gnu-ld happens to have this form.

llvm-svn: 166444
2012-10-22 22:13:48 +00:00
Anna Zaks 639b40484e [analyzer] CmpRuns: cleanup APIs, allow processing of plists with no
clang_version, fix the compare routine.

llvm-svn: 166129
2012-10-17 21:09:26 +00:00
Anna Zaks 93283d0933 [analyzer] Expose clang_version in CmpRuns
llvm-svn: 166048
2012-10-16 19:36:39 +00:00
Anna Zaks c80313b888 [analyzer] CmpRuns - cleaned up the API, added relative path getter
llvm-svn: 165995
2012-10-15 22:48:21 +00:00
Sean Silva e2bb2ff576 Remove pointless classof()'s.
Updates to llvm/Support/Casting.h have rendered these classof()'s
irrelevant.

llvm-svn: 165770
2012-10-11 23:31:23 +00:00
Sean Silva 88c42b7cfa tblgen: Build clang-tblgen without RTTI.
clang-tblgen no longer needs RTTI!

llvm-svn: 165650
2012-10-10 20:25:45 +00:00
Sean Silva 1c4aaa8d1c tblgen: Use LLVM-style RTTI in clang-tblgen
llvm-svn: 165649
2012-10-10 20:25:43 +00:00
Sean Silva f85f39df47 tblgen: Migrate clang-tblgen to new TableGenMain API.
llvm-svn: 165167
2012-10-03 21:29:30 +00:00
Dmitri Gribenko 1da8886915 Comment sema: warn when comment has \deprecated but declaration does not have a
deprecation attribute ('deprecated', 'availability' or 'unavailable').

This warning is under a separate flag, -Wdocumentation-deprecated-sync, so it
can be turned off easily while leaving other -Wdocumentation warnings on.

llvm-svn: 164467
2012-09-22 21:47:50 +00:00
Dmitri Gribenko b37d5e8a95 Comment parsing: handle \deprecated command. It is a block command, but it
should be fine to use it without further explanations in the attached
paragraph, so the warning about empty paragraph was turned off for it.

llvm-svn: 163836
2012-09-13 20:36:01 +00:00
Dmitri Gribenko 7acbf00f96 Comment AST: TableGen'ize all command lists in CommentCommandTraits.cpp.
Now we have a list of all commands.  This is a good thing in itself, but it
also enables us to easily implement typo correction for command names.

With this change we have objects that contain information about each command,
so it makes sense to resolve command name just once during lexing (currently we
store command names as strings and do a linear search every time some property
value is needed).  Thus comment token and AST nodes were changed to contain a
command ID -- index into a tables of builtin and registered commands.  Unknown
commands are registered during parsing and thus are also uniformly assigned an
ID.  Using an ID instead of a StringRef is also a nice memory optimization
since ID is a small integer that fits into a common bitfield in Comment class.

This change implies that to get any information about a command (even a command
name) we need a CommandTraits object to resolve the command ID to CommandInfo*.
Currently a fresh temporary CommandTraits object is created whenever it is
needed since it does not have any state.  But with this change it has state --
new commands can be registered, so a CommandTraits object was added to
ASTContext.

Also, in libclang CXComment has to be expanded to include a CXTranslationUnit
so that all functions working on comment AST nodes can get a CommandTraits
object.  This breaks binary compatibility of CXComment APIs.

Now clang_FullComment_getAsXML(CXTranslationUnit TU, CXComment CXC) doesn't
need TU parameter anymore, so it was removed.  This is a source-incompatible
change for this C API.

llvm-svn: 163540
2012-09-10 20:32:42 +00:00
Ted Kremenek dc1f6bc454 Add handy script for updating plist FileCheck expected output for
analyzer tests.

llvm-svn: 163486
2012-09-10 06:19:34 +00:00
Anna Zaks a2f970baa6 [analyzer] testing: add a build mode to allow C++11 testing.
llvm-svn: 163357
2012-09-06 23:30:27 +00:00
Roman Divacky e637711ae0 Dont cast away const needlessly. Found by gcc48 -Wcast-qual.
llvm-svn: 163325
2012-09-06 15:59:27 +00:00
Dmitri Gribenko 3ca956f715 Comment HTML tag name machers: move from StringSwitch to an efficient
TableGen-generated string matcher.

llvm-svn: 162969
2012-08-31 02:21:44 +00:00
Jordan Rose 9858b12381 Revert "[analyzer] Disable diagnostic checking on the buildbot."
This reverts commit befc0f648c83f65e1f3567f2058c7c18b4bc3ad8 now that
plist-html diagnostics are working again.

llvm-svn: 162966
2012-08-31 00:36:30 +00:00
Anna Zaks 5e2f0b2151 [analyzer] Disable diagnostic checking on the buildbot.
Due to recent diagnostic changes, we may generate malformed diagnostics.

llvm-svn: 162940
2012-08-30 21:04:09 +00:00
Anna Zaks 07a821fb17 [analyzer] Fixup 162863.
Thanks Jordan.

llvm-svn: 162875
2012-08-29 23:23:39 +00:00
Anna Zaks f329823dc0 [analyzer]Fix typo, unbreak static analyzer BuildBot (at least
partially).

(Addresses a regression from r162790.)

llvm-svn: 162864
2012-08-29 21:22:40 +00:00
Ted Kremenek f9a539d858 Automatically use more cores when the test build uses 'make'.
llvm-svn: 162790
2012-08-28 20:40:04 +00:00
Ted Kremenek 42c14428d2 Consolidate helper methods and configuration logic. No functionality change.
llvm-svn: 162789
2012-08-28 20:40:02 +00:00
Ted Kremenek 6cb2080e5e Pass --use-analyzer to scan-build when running within the test harness.
llvm-svn: 162783
2012-08-28 20:20:52 +00:00
Ted Kremenek 4220144acb experimental.security.taint is now alpha.security.taint
llvm-svn: 162775
2012-08-28 18:45:22 +00:00
Anna Zaks 7d2babc046 [analyzer] More internal stats collection.
llvm-svn: 162687
2012-08-27 18:38:32 +00:00
Anna Zaks e12365bc27 [analyzer] Ted fixed the plist-html issue, so the assert can go away.
llvm-svn: 162598
2012-08-24 21:07:49 +00:00
Anna Zaks af3ae3cbbd [analyzer] Unbreak the static analyzer buildbot.
We no longer associate the correct HTML file with plist diagnostic.
Fall out from r162028.

llvm-svn: 162071
2012-08-17 01:09:13 +00:00
Richard Smith 52f04a2e8f Don't constant-fold when pretty-printing alignment attribute. This fixes a
potential crasher -- Context is sometimes a null reference (!!) here.

llvm-svn: 162007
2012-08-16 02:43:29 +00:00
Richard Smith f44b8ee52e Placate the mingw32 buildbot by suffixing 64-bit constants with ULL.
llvm-svn: 161831
2012-08-14 03:55:16 +00:00
Richard Smith 7d6d47b862 Fix undefined behavior (and wrong code, as far as I can tell) in NEON builtin
tablegen code, found by -fcatch-undefined-behavior. I would appreciate if
someone more familiar with the NEON code could point me in the direction of how
to write a test for this. We appear to have essentially no test coverage
whatsoever for these builtins.

llvm-svn: 161827
2012-08-14 01:28:02 +00:00
Ted Kremenek 5d858cb916 Fix horrible regression in control of warnings caused by introduction of -Wpedantic.
While -Wpedantic was reasonable, -Wno-pedantic would turn off a bunch of warnings that
are on by default.  This counters the intention of this warning flag.

To fix this, -Wpedantic now includes extentions that are not on by default.  The
remaining warnings will manifest anyway, and won't accidentally get turned off
by -Wno-pedantic.

Fixes <rdar://problem/12076105>

llvm-svn: 161695
2012-08-10 20:50:00 +00:00
Joerg Sonnenberger 42cf26883e Add missing cctype includes.
llvm-svn: 161660
2012-08-10 10:58:18 +00:00
Ted Kremenek 724923945b Enhance ClangDiagnosticsEmitter to reject diagnostics that are errors that are also
included in warning groups.  Warning groups can only contain warnings, because only
warnings can be mapped to errors or ignored.

This caught a few diagnostics that were incorrectly in diagnostic groups, and
could have resulted in a compiler crash when those diagnostic groups were mapped.

Fixes <rdar://problem/12044436>

llvm-svn: 161389
2012-08-07 05:01:49 +00:00
Jim Grosbach cc6b1816fd TableGen: Remove extraneous \ character from arm_neon.h definitions.
llvm-svn: 161244
2012-08-03 17:30:46 +00:00
Anna Zaks 45a992b5f0 [analyzer] CmpRuns should include file name in the issue identifier.
This prevents us from treating the issues from different files with the
same function names and same offsets as the same.

The issue identifier now includes the file name. Also added a way to
strip off the root directories form the source file names.

llvm-svn: 161150
2012-08-02 00:41:40 +00:00
Jordan Rose c2a3223da9 SATestBuild should not ask for non-existent checkers.
- "cocoa" was moved to "osx.cocoa" a long time ago.
- "cplusplus" would be a valid package except we don't have any C++ checkers.

llvm-svn: 160821
2012-07-26 22:31:59 +00:00
Jordan Rose 5920a1bdd1 Un-break standalone invocations of CmpRuns.py.
Fallout from CmpRuns.py API changes in r160314.

llvm-svn: 160800
2012-07-26 20:03:51 +00:00
Michael Han 7973250e33 Remove an unused header
llvm-svn: 160492
2012-07-19 04:10:19 +00:00