diff options
| author | Nick Lewycky <nicholas@mxc.ca> | 2011-02-16 23:59:08 +0000 |
|---|---|---|
| committer | Nick Lewycky <nicholas@mxc.ca> | 2011-02-16 23:59:08 +0000 |
| commit | 8d2226208d1717ddc34c63707d2ffcfc6f1d21b6 (patch) | |
| tree | de27cedd72d7b180786ca6eebab0a8cb90500348 /clang/test | |
| parent | 197fcd44188b6923a515ac8a9798501af165cd8f (diff) | |
| download | bcm5719-llvm-8d2226208d1717ddc34c63707d2ffcfc6f1d21b6.tar.gz bcm5719-llvm-8d2226208d1717ddc34c63707d2ffcfc6f1d21b6.zip | |
Ensure that the NRVO flag has some block to insert into. Fixes PR9178!
llvm-svn: 125694
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/CodeGenCXX/nrvo-noreturn.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/nrvo-noreturn.cc b/clang/test/CodeGenCXX/nrvo-noreturn.cc new file mode 100644 index 00000000000..a8259cab5f3 --- /dev/null +++ b/clang/test/CodeGenCXX/nrvo-noreturn.cc @@ -0,0 +1,17 @@ +// RUN: %clang_cc1 -emit-llvm-only %s +// PR9178 + +void abort() __attribute__((__noreturn__)); +struct CoinModelLink { + CoinModelLink(); + ~CoinModelLink(); +}; +class CoinModel { + CoinModelLink firstInQuadraticColumn(); +}; +CoinModelLink CoinModel::firstInQuadraticColumn() { + abort(); + CoinModelLink x; + return x; +} + |

