diff options
author | Eric Christopher <echristo@apple.com> | 2011-08-15 22:38:22 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2011-08-15 22:38:22 +0000 |
commit | 041087caec03e8855770695d3eabc0feb031f6ed (patch) | |
tree | 40df708abc50c383e26d554a861ba44dbc707412 /test/CodeGenCXX/2009-05-04-PureConstNounwind.cpp | |
parent | b917e6490e7aa0b255111cd762a277de18cfa641 (diff) |
'pure' and 'const' functions should also be marked nounwind. Migrate
test over from llvm/test/FrontendC++ and update others to account for
the change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137669 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/2009-05-04-PureConstNounwind.cpp')
-rw-r--r-- | test/CodeGenCXX/2009-05-04-PureConstNounwind.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/CodeGenCXX/2009-05-04-PureConstNounwind.cpp b/test/CodeGenCXX/2009-05-04-PureConstNounwind.cpp new file mode 100644 index 0000000000..708920792b --- /dev/null +++ b/test/CodeGenCXX/2009-05-04-PureConstNounwind.cpp @@ -0,0 +1,8 @@ +// RUN: %clang_cc1 -fexceptions -emit-llvm %s -o - | grep nounwind | count 4 +int c(void) __attribute__((const)); +int p(void) __attribute__((pure)); +int t(void); + +int f(void) { + return c() + p() + t(); +} |