summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema
Commit message (Collapse)AuthorAgeFilesLines
* Add back -Wduplicate-enum which I mistakenly removed.Ted Kremenek2012-12-221-0/+92
| | | | | | | | | | | | This was removed with -Wunique-enum, which is still removed. The corresponding thread on cfe-comments for that warning is here: http://lists.cs.uiuc.edu/pipermail/cfe-dev/2012-September/024224.html If we get specific user feedback for -Wduplicate-enum we can evaluate whether or not to keep it. llvm-svn: 170974
* Fix PR14591: Windows newlines in doxygen comments cause failed assertion inDmitri Gribenko2012-12-191-0/+13
| | | | | | | | TextDiagnostic Patch by Janusz Chorko. llvm-svn: 170566
* Add tests to check recent changes to some builtins.Bill Wendling2012-12-181-0/+15
| | | | llvm-svn: 170458
* When warning about a missing prototype because a function declaration is ↵Anders Carlsson2012-12-181-1/+7
| | | | | | missing 'void', insert a fixit to add the void. llvm-svn: 170399
* Fix isThisDeclarationADefinition for extern following tentative.Rafael Espindola2012-12-171-0/+2
| | | | | | | | An extern declaration following a tentative definition should not itself be considered a tentative definition. Fixes pr14614. llvm-svn: 170377
* [ms-inline asm] Test case for r170037.Chad Rosier2012-12-121-1/+4
| | | | llvm-svn: 170038
* [driver, ms-inline asm] MS-Style inline assembly is controlled by theChad Rosier2012-12-051-1/+1
| | | | | | | -fasm-blocks flag, not the -fms-extensions flag. rdar://12808010 llvm-svn: 169422
* Merge function types in C.Rafael Espindola2012-11-291-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Among other differences, GCC accepts typedef int IA[]; typedef int A10[10]; static A10 *f(void); static IA *f(void); void g(void) { (void)sizeof(*f()); } but clang used to reject it with: invalid application of 'sizeof' to an incomplete type 'IA' (aka 'int []') The intention of c99's 6.2.7 seems to be that we should use the composite type and accept as gcc does. Doing the type merging required some extra fixes: * Use the type from the function type in initializations, even if an parameter is available. * Fix the merging of the noreturn attribute in function types. * Make CodeGen handle the fact that an parameter type can be different from the corresponding type in the function type. llvm-svn: 168895
* Reject uses of __int128 on platforms that don't support it. Also move the uglyRichard Smith2012-11-291-1/+13
| | | | | | | 'getPointerWidth(0) >= 64' test to be a method on TargetInfo, ready to be properly cleaned up. llvm-svn: 168856
* Test for r168674.Eli Friedman2012-11-271-0/+11
| | | | llvm-svn: 168675
* Add a testcase that r168411 would break.Rafael Espindola2012-11-271-0/+11
| | | | llvm-svn: 168669
* Check that we don't warn on this testcase. This is basically a test thatRafael Espindola2012-11-231-1/+1
| | | | | | | Decl::isUsed checks the attribute. If the function had a body just the check is DeclMustBeEmitted would be sufficient. llvm-svn: 168514
* clang/test/Sema/warn-documentation.cpp: Try to fix up the testcase in r168277.NAKAMURA Takumi2012-11-181-1/+1
| | | | llvm-svn: 168278
* Documentation parsing: propely handle a lone '\endverbatim' and emit a warning.Dmitri Gribenko2012-11-181-0/+18
| | | | | | | | We actually used to assert on this. Thanks to NAKAMURA Takumi for noticing this! llvm-svn: 168277
* Made the "expected string literal" diagnostic more expressiveAndy Gibbs2012-11-171-0/+2
| | | | llvm-svn: 168267
* Fix a trivial bool-related bug I spotted while skimming David Fang'sEli Friedman2012-11-151-0/+4
| | | | | | current list of powerpc-darwin8 failures. llvm-svn: 168016
* Correct printing of nested anonymous type member accesses.David Blaikie2012-11-121-1/+13
| | | | | | Patch by Florent Bruneau! llvm-svn: 167736
* Set TLSSupported to false on Haiku.Benjamin Kramer2012-11-081-0/+3
| | | | | | | | | | | Haiku does not support this (yet). Leaving it set to true leads to configure scripts detecting __thread being available and Clang emitting code for it, resulting in binaries the runtime_loader will refuse to load. Patch by Jonathan Schleifer! llvm-svn: 167576
* Handle CK_NullToPointer casts in -Wtype-safety properly. Fixes PR14249.Dmitri Gribenko2012-11-033-1/+15
| | | | llvm-svn: 167358
* Tweak wording and add diagnostic groups to misc diagnostics.Eli Friedman2012-11-023-5/+5
| | | | llvm-svn: 167274
* Update the front end to use minsize attributeQuentin Colombet2012-11-011-0/+5
| | | | llvm-svn: 167266
* [ms-inline asm] Add test case for r166792.Chad Rosier2012-10-261-0/+14
| | | | llvm-svn: 166793
* These tests require an actual x86 registered target, so mark them as such. ↵David Tweed2012-10-261-0/+1
| | | | | | | | Tested on ARM. Patch by Joey Gouly. llvm-svn: 166765
* Fix grammar-o.Bill Wendling2012-10-261-2/+2
| | | | llvm-svn: 166759
* Add an additional test for namespaces and -Wmissing-variable-declarations. ↵Eli Friedman2012-10-241-39/+0
| | | | | | Move C++ test into SemaCXX. llvm-svn: 166616
* Address feedback from Eli Friedman on r166522.Matt Beaumont-Gay2012-10-241-4/+8
| | | | | | | In particular, we do want to warn on some unused cast subexpressions within macros. llvm-svn: 166534
* Don't emit -Wunused-value warnings from macro expansions.Matt Beaumont-Gay2012-10-231-0/+7
| | | | llvm-svn: 166522
* Delete junk that snuck into r166498.Eli Friedman2012-10-231-18/+0
| | | | llvm-svn: 166499
* Add a new warning -Wmissing-variable-declarations, to warn about variablesEli Friedman2012-10-232-0/+75
| | | | | | | | | defined without a previous declaration. This is similar to -Wmissing-prototypes, but for variables instead of functions. Patch by Ed Schouten. llvm-svn: 166498
* [ms-inline-asm] Add handling for errors coming out of the backend.Eli Friedman2012-10-231-2/+17
| | | | llvm-svn: 166463
* Clarify wording of -Wshift-op-parentheses.David Blaikie2012-10-191-3/+3
| | | | | | Suggestion from Matt Beaumont-Gay reviewing r165283. llvm-svn: 166296
* Prior to adding the new "expected-no-diagnostics" directive to ↵Andy Gibbs2012-10-1956-0/+56
| | | | | | VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive. llvm-svn: 166280
* Fix directive parsing in VerifyDiagnosticConsumer so that it ensures that ↵Andy Gibbs2012-10-192-15/+15
| | | | | | | | "expected" is at the start of the word and will no longer accept typos such as "junkexpected-*" as a valid "expected-*" directive. A very few test-cases had to be amended to adhere to the new rule. Patch reviewed by David Blaikie. llvm-svn: 166279
* Add pnaclcall convention to Native Client targets.Derek Schuff2012-10-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Because PNaCl bitcode must be target-independent, it uses some different bitcode representations from other targets (e.g. byval and sret for structures). This means that without additional type information, it cannot meet some native ABI requirements for some targets (e.g. passing structures containing unions by value on x86-64). To allow generation of code which uses the correct native ABIs, we also support triples such as x86_64-nacl, which uses target-dependent IR (as opposed to le32-nacl, which uses byval and sret). To allow interoperation between the two types of code, this patch adds a calling convention attribute to be used in code compiled with the target-dependent triple, which will generate code using the le32-style bitcode. This calling convention does not need to be explicitly supported in the backend because it determines bitcode representation rather than native conventions (the backend just needs to undersand how to handle byval and sret for the Native Client OS). This patch implements __attribute__((pnaclcall)) to generate calls in bitcode according to the le32 bitcode conventions, an attribute which is accepted by any Native Client target, but issues a warning otherwise. llvm-svn: 166065
* Implement GCC's -Wint-to-pointer-cast.David Blaikie2012-10-163-5/+14
| | | | | | | | | | | | This implementation doesn't warn on anything that GCC doesn't warn on with the exception of templates specializations (GCC doesn't warn, Clang does). The specific skipped cases (boolean, constant expressions, enums) are open for debate/adjustment if anyone wants to demonstrate that GCC is being overly conservative here. The only really obvious false positive I found was in the Clang regression suite's MPI test - apparently MPI uses specific flag values in pointer constants. (eg: #define FOO (void*)~0) llvm-svn: 166039
* Make -mms-bitfields behave consistently.Eli Friedman2012-10-122-0/+18
| | | | | | Patch by Jeremiah Zanin. llvm-svn: 165849
* Fix PR 11709: Change the definition of va_list to meet AAPCS requirementLogan Chien2012-10-101-1/+19
| | | | | | | | | | | | | AAPCS ABI Section 7.1.4 [1] specifies that va_list should be defined as struct __va_list { void *__ap;}; And in C++, it is defined in namespace std. [1] http://infocenter.arm.com/help/topic /com.arm.doc.ihi0042d/IHI0042D_aapcs.pdf Patch by Weiming Zhao. llvm-svn: 165609
* Make sure we allow "#pragma options align=mac68k" in function-local ↵Eli Friedman2012-10-081-0/+12
| | | | | | contexts. <rdar://problem/12453134> llvm-svn: 165462
* Use a single note diagnostic for all the precedent/parentheses warnings.David Blaikie2012-10-081-3/+3
| | | | llvm-svn: 165384
* Expose __builtin_bswap16.Benjamin Kramer2012-10-062-4/+6
| | | | | | | GCC has always supported this on PowerPC and 4.8 supports it on all platforms, so it's a good idea to expose it in clang too. LLVM supports this on all targets. llvm-svn: 165362
* Changing line endings from Windows to Unix. No functional changes.Aaron Ballman2012-10-052-26/+26
| | | | llvm-svn: 165329
* Implement -Wshift-op-parentheses for: a << b + cDavid Blaikie2012-10-051-0/+12
| | | | | | | | | | | | This appears to be consistent with GCC's implementation of the same warning under -Wparentheses. Suppressing a << b + c for cases where 'a' is a user defined type for compatibility with C++ stream IO. Otherwise suggest parentheses around the addition or subtraction subexpression. (this came up when MSVC was complaining (incorrectly, so far as I can tell) about a perceived violation of this within the LLVM codebase, PR14001) llvm-svn: 165283
* Permanently end the whole "pragma got handled by the parser too early"Eli Friedman2012-10-041-0/+11
| | | | | | | mess by handling all pragmas which the parser touches uniformly. <rdar://problem/12248901>, etc. llvm-svn: 165195
* Splitting this test case into two because the behavior for the calling ↵Aaron Ballman2012-10-022-6/+6
| | | | | | convention code is target-specific. llvm-svn: 165016
* Allowing individual targets to determine whether a given calling convention ↵Aaron Ballman2012-10-025-5/+39
| | | | | | | | is allowed or ignored with warning. This allows for correct name mangling for x64 targets on Windows, which in turn allows for linking against the Win32 APIs. Fixes PR13782 llvm-svn: 165015
* availability in structured documents. TakesFariborz Jahanian2012-10-012-6/+6
| | | | | | care of comments by Dimitri and Doug. llvm-svn: 164957
* Move the 'find macro by spelling' infrastructure to the Preprocessor class andDmitri Gribenko2012-09-291-0/+7
| | | | | | | use it to suggest appropriate macro for __attribute__((deprecated)) in -Wdocumentation-deprecated-sync. llvm-svn: 164892
* Allow __builtin_bswap32/64 in constant expressions, like gcc does. Patch by ↵Richard Smith2012-09-282-0/+4
| | | | | | Tijl Coosemans! llvm-svn: 164841
* Make this test actually test somethingNico Weber2012-09-261-1/+1
| | | | llvm-svn: 164677
* Fix failing test/Sema/wchar.c on ARM.Hans Wennborg2012-09-251-0/+2
| | | | | | | | | | | Currently Sema/wchar.c fails because WCHAR_T_TYPE is defined as int, however on ARM wchar_t is unsigned int. This patch changes that, so this test passes for ARM. Patch by Joey Gouly! llvm-svn: 164598
OpenPOWER on IntegriCloud