summaryrefslogtreecommitdiffstats
path: root/clang/test/FixIt/fixit-nullability-declspec.cpp
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2016-11-07 20:34:16 +0000
committerJordan Rose <jordan_rose@apple.com>2016-11-07 20:34:16 +0000
commitf1271c8d087273af381e2ae5e447c2314c4a1f74 (patch)
treeff19f2990221c3f354a7a22057962a88a8337d41 /clang/test/FixIt/fixit-nullability-declspec.cpp
parent7b48463d3d80509eeca2ed3fa23f7e41d0b954eb (diff)
downloadbcm5719-llvm-f1271c8d087273af381e2ae5e447c2314c4a1f74.tar.gz
bcm5719-llvm-f1271c8d087273af381e2ae5e447c2314c4a1f74.zip
Disallow StringRef assignment from temporary std::strings.
Similar to r283798, this prevents accidentally referring to temporary storage that goes out of scope by the end of the statement: someStringRef = getStringByValue(); someStringRef = (Twine("-") + otherString).str(); Note that once again the constructor still has this problem: StringRef someStringRef = getStringByValue(); because once again we occasionally rely on this in calls: takesStringRef(getStringByValue()); takesStringRef(Twine("-") + otherString); Still, it's a step. llvm-svn: 286139
Diffstat (limited to 'clang/test/FixIt/fixit-nullability-declspec.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud