summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorRichard Trieu <rtrieu@google.com>2016-08-06 01:44:06 +0000
committerRichard Trieu <rtrieu@google.com>2016-08-06 01:44:06 +0000
commite056aee9d98925dc1c2511933296f0ff9f63e196 (patch)
treedd35c554b55637af4308b0f1418c3c75bdb05f21 /clang
parent4cd2845e6a6f27dd5848e094ed9640ac88017c34 (diff)
downloadbcm5719-llvm-e056aee9d98925dc1c2511933296f0ff9f63e196.tar.gz
bcm5719-llvm-e056aee9d98925dc1c2511933296f0ff9f63e196.zip
Fix typos from r277797 and unused variable from r277889.
llvm-svn: 277900
Diffstat (limited to 'clang')
-rw-r--r--clang/lib/AST/ASTDiagnostic.cpp8
-rw-r--r--clang/test/SemaCXX/return-stack-addr-2.cpp3
2 files changed, 4 insertions, 7 deletions
diff --git a/clang/lib/AST/ASTDiagnostic.cpp b/clang/lib/AST/ASTDiagnostic.cpp
index 85ab4cc3e64..590defb7ee5 100644
--- a/clang/lib/AST/ASTDiagnostic.cpp
+++ b/clang/lib/AST/ASTDiagnostic.cpp
@@ -938,13 +938,13 @@ class TemplateDiff {
/// isEnd - Returns true if the iterator is one past the end.
bool isEnd() const {
- assert(TST && "InternalalIterator is invalid with a null TST.");
+ assert(TST && "InternalIterator is invalid with a null TST.");
return Index >= TST->getNumArgs();
}
/// &operator++ - Increment the iterator to the next template argument.
InternalIterator &operator++() {
- assert(TST && "InternalalIterator is invalid with a null TST.");
+ assert(TST && "InternalIterator is invalid with a null TST.");
if (isEnd()) {
return *this;
}
@@ -980,7 +980,7 @@ class TemplateDiff {
/// operator* - Returns the appropriate TemplateArgument.
reference operator*() const {
- assert(TST && "InternalalIterator is invalid with a null TST.");
+ assert(TST && "InternalIterator is invalid with a null TST.");
assert(!isEnd() && "Index exceeds number of arguments.");
if (CurrentTA == EndTA)
return TST->getArg(Index);
@@ -990,7 +990,7 @@ class TemplateDiff {
/// operator-> - Allow access to the underlying TemplateArgument.
pointer operator->() const {
- assert(TST && "InternalalIterator is invalid with a null TST.");
+ assert(TST && "InternalIterator is invalid with a null TST.");
return &operator*();
}
};
diff --git a/clang/test/SemaCXX/return-stack-addr-2.cpp b/clang/test/SemaCXX/return-stack-addr-2.cpp
index f6ea9b2a738..47b45957e94 100644
--- a/clang/test/SemaCXX/return-stack-addr-2.cpp
+++ b/clang/test/SemaCXX/return-stack-addr-2.cpp
@@ -65,20 +65,17 @@ const int *int6() {
const int *int7(int x) {
const int &x2 = x; // expected-note{{binding reference variable 'x2' here}}
- const int &x3 = x2;
return &x2; // expected-warning{{address of stack memory associated with local variable 'x' returned}}
}
const int *int8(const int &x = 5) {
const int &x2 = x;
- const int &x3 = x2;
return &x2;
}
const int *int9() {
const int &x = 5; // expected-note{{binding reference variable 'x' here}}
const int &x2 = x; // expected-note{{binding reference variable 'x2' here}}
- const int &x3 = x2;
return &x2; // expected-warning{{returning address of local temporary object}}
}
}
OpenPOWER on IntegriCloud