summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/builtin-prefetch.c
Commit message (Collapse)AuthorAgeFilesLines
* [x86] Teach the builtin argument range check to allow invalid ranges inChandler Carruth2018-06-211-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dead code. This is important for C++ templates that essentially compute the valid input in a way that is constant and will cause all the invalid cases to be dead code that is deleted. Code in the wild actually does this and GCC also accepts these kinds of patterns so it is important to support it. To make this work, we provide a non-error path to diagnose these issues, and use a default-error warning instead. This keeps the relatively strict handling but prevents nastiness like SFINAE on these errors. It also allows us to safely use the system to diagnose this only when it occurs at runtime (in emitted code). Entertainingly, this required fixing the syntax in various other ways for the x86 test because we never bothered to diagnose that the returns were invalid. Since debugging these compile failures was super confusing, I've also improved the diagnostic to actually say what the value was. Most of the checks I've made ignore this to simplify maintenance, but I've checked it in a few places to make sure the diagnsotic is working. Depends on D48462. Without that, we might actually crash some part of the compiler after bypassing the error here. Thanks to Richard, Ben Kramer, and especially Craig Topper for all the help here. Differential Revision: https://reviews.llvm.org/D48464 llvm-svn: 335309
* Remove the argument number from the constant integer diagnostic.Eric Christopher2010-04-191-2/+2
| | | | | | Update all of the testcases accordingly. llvm-svn: 101795
* Consolidate most of the integer constant expression builtin requirementEric Christopher2010-04-171-2/+2
| | | | | | | | checking into a single function and use that throughout. Remove some now unnecessary diagnostics and update tests with now more accurate diagnostics. llvm-svn: 101610
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-151-1/+1
| | | | | | | | | - This is designed to make it obvious that %clang_cc1 is a "test variable" which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it can be useful to redefine what gets run as 'clang -cc1' (for example, to set a default target). llvm-svn: 91446
* Fix for PR5679: make __builtin_prefetch a bit more flexible in what it acceptsEli Friedman2009-12-041-1/+2
| | | | | | | as a constant integer. Also, some minor cleanup and improvements to the diagnostics. llvm-svn: 90504
* Prep for new warning.Mike Stump2009-07-221-1/+1
| | | | llvm-svn: 76709
* Rename clang to clang-cc.Daniel Dunbar2009-03-241-1/+1
| | | | | | Tests and drivers updated, still need to shuffle dirs. llvm-svn: 67602
* Switch several more Sema Diag methods over. This simplifies theChris Lattner2008-11-191-2/+2
| | | | | | | | __builtin_prefetch code to only emit one diagnostic per builtin_prefetch. While this has nothing to do with the rest of the patch, the code seemed like overkill when I was updating it. llvm-svn: 59588
* Implement nans, prefetch, and trap builtins. Daniel Dunbar2008-07-211-0/+13
This closes <rdar://problem/6080720>, support for __builtin_constant_p has been filed separately. llvm-svn: 53885
OpenPOWER on IntegriCloud