]> granicus.if.org Git - clang/commitdiff
Fix typos from r277797 and unused variable from r277889.
authorRichard Trieu <rtrieu@google.com>
Sat, 6 Aug 2016 01:44:06 +0000 (01:44 +0000)
committerRichard Trieu <rtrieu@google.com>
Sat, 6 Aug 2016 01:44:06 +0000 (01:44 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@277900 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/ASTDiagnostic.cpp
test/SemaCXX/return-stack-addr-2.cpp

index 85ab4cc3e64c8c829468644346379260b91bbc89..590defb7ee590ce0ed4f6b4653c8a3fce44b040e 100644 (file)
@@ -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*();
       }
     };
index f6ea9b2a738a5a711345771e4d06068f7def0bff..47b45957e94b783e1c91a10e30277bec4cc9da91 100644 (file)
@@ -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}}
 }
 }