[clang] 8313d2a - [OpenACC] Fixup previous-clause diagnostics

via cfe-commits cfe-commits at lists.llvm.org
Fri May 2 09:35:37 PDT 2025


Author: erichkeane
Date: 2025-05-02T09:35:32-07:00
New Revision: 8313d2a8dbc5e23741d7c67c3b009fc3f6de4875

URL: https://github.com/llvm/llvm-project/commit/8313d2a8dbc5e23741d7c67c3b009fc3f6de4875
DIFF: https://github.com/llvm/llvm-project/commit/8313d2a8dbc5e23741d7c67c3b009fc3f6de4875.diff

LOG: [OpenACC] Fixup previous-clause diagnostics

Brought up in a previous review as a TODO, we could be better about how
we highlight what hte previous clause was, and how to show that the
'device_type' is the one being targetted.  This patch rewords the
diagnostics and updates a massive number of tests.

Added: 
    

Modified: 
    clang/include/clang/Basic/DiagnosticSemaKinds.td
    clang/lib/Sema/SemaOpenACC.cpp
    clang/lib/Sema/SemaOpenACCClause.cpp
    clang/lib/Sema/SemaOpenACCClauseAppertainment.cpp
    clang/test/ParserOpenACC/parse-clauses.c
    clang/test/SemaOpenACC/atomic-construct.cpp
    clang/test/SemaOpenACC/combined-construct-auto_seq_independent-clauses.c
    clang/test/SemaOpenACC/combined-construct-default-clause.c
    clang/test/SemaOpenACC/combined-construct-default-clause.cpp
    clang/test/SemaOpenACC/combined-construct-device_type-clause.c
    clang/test/SemaOpenACC/combined-construct-gang-clause.cpp
    clang/test/SemaOpenACC/combined-construct-num_gangs-clause.c
    clang/test/SemaOpenACC/combined-construct-num_workers-clause.c
    clang/test/SemaOpenACC/combined-construct-reduction-clause.cpp
    clang/test/SemaOpenACC/combined-construct-self-clause.c
    clang/test/SemaOpenACC/combined-construct-self-clause.cpp
    clang/test/SemaOpenACC/combined-construct-vector-clause.cpp
    clang/test/SemaOpenACC/combined-construct-vector_length-clause.c
    clang/test/SemaOpenACC/combined-construct-worker-clause.cpp
    clang/test/SemaOpenACC/compute-construct-async-clause.c
    clang/test/SemaOpenACC/compute-construct-default-clause.c
    clang/test/SemaOpenACC/compute-construct-default-clause.cpp
    clang/test/SemaOpenACC/compute-construct-device_type-clause.c
    clang/test/SemaOpenACC/compute-construct-num_gangs-clause.c
    clang/test/SemaOpenACC/compute-construct-num_workers-clause.c
    clang/test/SemaOpenACC/compute-construct-reduction-clause.c
    clang/test/SemaOpenACC/compute-construct-reduction-clause.cpp
    clang/test/SemaOpenACC/compute-construct-self-clause.c
    clang/test/SemaOpenACC/compute-construct-self-clause.cpp
    clang/test/SemaOpenACC/compute-construct-vector_length-clause.c
    clang/test/SemaOpenACC/data-construct-async-clause.c
    clang/test/SemaOpenACC/data-construct-default-clause.c
    clang/test/SemaOpenACC/data-construct-device_type-clause.c
    clang/test/SemaOpenACC/data-construct-if-clause.c
    clang/test/SemaOpenACC/data-construct.cpp
    clang/test/SemaOpenACC/init-construct.cpp
    clang/test/SemaOpenACC/loop-construct-auto_seq_independent-clauses.c
    clang/test/SemaOpenACC/loop-construct-collapse-clause.cpp
    clang/test/SemaOpenACC/loop-construct-device_type-clause.c
    clang/test/SemaOpenACC/loop-construct-gang-clause.cpp
    clang/test/SemaOpenACC/loop-construct-reduction-clause.cpp
    clang/test/SemaOpenACC/loop-construct-tile-clause.cpp
    clang/test/SemaOpenACC/loop-construct-vector-clause.cpp
    clang/test/SemaOpenACC/loop-construct-worker-clause.cpp
    clang/test/SemaOpenACC/routine-construct-clauses.cpp
    clang/test/SemaOpenACC/set-construct.cpp
    clang/test/SemaOpenACC/shutdown-construct.cpp
    clang/test/SemaOpenACC/update-construct.cpp

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td
index 060ad6085e510..e5a7cdc14a737 100644
--- a/clang/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/clang/include/clang/Basic/DiagnosticSemaKinds.td
@@ -13009,14 +13009,10 @@ def err_acc_clause_appertainment
 def err_acc_duplicate_clause_disallowed
     : Error<"OpenACC '%1' clause cannot appear more than once on a '%0' "
             "directive">;
-def note_acc_previous_clause_here : Note<"previous clause is here">;
-// TODO(OpenACC): Combine these with the one above, and decide between a
-// 'select' to split between showing the clause name, or just always printing
-// the name.
-def note_acc_previous_named_clause_here : Note<"previous '%0' clause is here">;
-def note_acc_device_type_here
+def note_acc_previous_clause_here : Note<"previous '%0' clause is here">;
+def note_acc_active_applies_clause_here
     : Note<"%enum_select<ACCDeviceTypeApp>{%Active{active}|%Applies{which "
-           "applies to}}0 'device_type' clause here">;
+           "applies to}}0 '%1' clause here">;
 def note_acc_previous_expr_here : Note<"previous expression is here">;
 def note_acc_previous_reference : Note<"previous reference is here">;
 def err_acc_branch_in_out_compute_construct
@@ -13267,7 +13263,7 @@ def err_acc_duplicate_bind
             "permitted to refer to the same function">;
 def err_acc_duplicate_unnamed_bind
     : Error<"OpenACC 'bind' clause on a declaration must bind to the same name "
-            "as previous bind clauses">;
+            "as previous 'bind' clauses">;
 def warn_acc_confusing_routine_name
     : Warning<"OpenACC 'routine' directive with a name refers to a function "
               "with the same name as the function on the following line; this "

diff  --git a/clang/lib/Sema/SemaOpenACC.cpp b/clang/lib/Sema/SemaOpenACC.cpp
index 071dd55f4937c..cd045996f60b6 100644
--- a/clang/lib/Sema/SemaOpenACC.cpp
+++ b/clang/lib/Sema/SemaOpenACC.cpp
@@ -2259,7 +2259,8 @@ void SemaOpenACC::CheckRoutineDecl(SourceLocation DirLoc,
           (*cast<OpenACCBindClause>(*BindItr)) !=
               (*cast<OpenACCBindClause>(*OtherBindItr))) {
         Diag((*BindItr)->getBeginLoc(), diag::err_acc_duplicate_unnamed_bind);
-        Diag((*OtherBindItr)->getEndLoc(), diag::note_acc_previous_clause_here);
+        Diag((*OtherBindItr)->getEndLoc(), diag::note_acc_previous_clause_here)
+            << (*BindItr)->getClauseKind();
         return;
       }
     }
@@ -2273,7 +2274,8 @@ void SemaOpenACC::CheckRoutineDecl(SourceLocation DirLoc,
     if (auto *RA = dyn_cast<OpenACCRoutineAnnotAttr>(A);
         RA && RA->getRange().getEnd().isValid()) {
       Diag((*BindItr)->getBeginLoc(), diag::err_acc_duplicate_bind);
-      Diag(RA->getRange().getEnd(), diag::note_acc_previous_clause_here);
+      Diag(RA->getRange().getEnd(), diag::note_acc_previous_clause_here)
+          << "bind";
       return;
     }
   }
@@ -2318,7 +2320,8 @@ OpenACCRoutineDecl *SemaOpenACC::CheckRoutineDecl(
           if (OtherBindItr != RA->Clauses.end()) {
             Diag((*BindItr)->getBeginLoc(), diag::err_acc_duplicate_bind);
             Diag((*OtherBindItr)->getEndLoc(),
-                 diag::note_acc_previous_clause_here);
+                 diag::note_acc_previous_clause_here)
+                << (*BindItr)->getClauseKind();
             return nullptr;
           }
         }
@@ -2326,7 +2329,8 @@ OpenACCRoutineDecl *SemaOpenACC::CheckRoutineDecl(
         if (auto *RA = dyn_cast<OpenACCRoutineAnnotAttr>(A);
             RA && RA->getRange().getEnd().isValid()) {
           Diag((*BindItr)->getBeginLoc(), diag::err_acc_duplicate_bind);
-          Diag(RA->getRange().getEnd(), diag::note_acc_previous_clause_here);
+          Diag(RA->getRange().getEnd(), diag::note_acc_previous_clause_here)
+              << (*BindItr)->getClauseKind();
           return nullptr;
         }
       }

diff  --git a/clang/lib/Sema/SemaOpenACCClause.cpp b/clang/lib/Sema/SemaOpenACCClause.cpp
index ee0d217de74ff..5a335352e6704 100644
--- a/clang/lib/Sema/SemaOpenACCClause.cpp
+++ b/clang/lib/Sema/SemaOpenACCClause.cpp
@@ -127,7 +127,9 @@ bool checkValidAfterDeviceType(
   S.Diag(NewClause.getBeginLoc(), diag::err_acc_clause_after_device_type)
       << NewClause.getClauseKind() << DeviceTypeClause.getClauseKind()
       << NewClause.getDirectiveKind();
-  S.Diag(DeviceTypeClause.getBeginLoc(), diag::note_acc_previous_clause_here);
+  S.Diag(DeviceTypeClause.getBeginLoc(),
+         diag::note_acc_active_applies_clause_here)
+      << diag::ACCDeviceTypeApp::Active << DeviceTypeClause.getClauseKind();
   return true;
 }
 
@@ -164,7 +166,8 @@ class SemaOpenACCClauseVisitor {
       SemaRef.Diag(Clause.getBeginLoc(), diag::err_acc_clause_cannot_combine)
           << Clause.getClauseKind() << (*Itr)->getClauseKind()
           << Clause.getDirectiveKind();
-      SemaRef.Diag((*Itr)->getBeginLoc(), diag::note_acc_previous_clause_here);
+      SemaRef.Diag((*Itr)->getBeginLoc(), diag::note_acc_previous_clause_here)
+          << (*Itr)->getClauseKind();
 
       return true;
     }
@@ -250,7 +253,8 @@ class SemaOpenACCClauseVisitor {
           << (*ExistingProhibitedClause)->getClauseKind()
           << Clause.getDirectiveKind();
       SemaRef.Diag((*ExistingProhibitedClause)->getBeginLoc(),
-                   diag::note_acc_previous_clause_here);
+                   diag::note_acc_previous_clause_here)
+          << (*ExistingProhibitedClause)->getClauseKind();
       return true;
     }
 
@@ -268,9 +272,12 @@ class SemaOpenACCClauseVisitor {
           diag::err_acc_clause_routine_cannot_combine_before_device_type)
           << Clause.getClauseKind() << (*BeforeDeviceType)->getClauseKind();
       SemaRef.Diag((*BeforeDeviceType)->getBeginLoc(),
-                   diag::note_acc_previous_clause_here);
+                   diag::note_acc_previous_clause_here)
+          << (*BeforeDeviceType)->getClauseKind();
       SemaRef.Diag((*FirstDeviceType)->getBeginLoc(),
-                   diag::note_acc_previous_clause_here);
+                   diag::note_acc_active_applies_clause_here)
+          << diag::ACCDeviceTypeApp::Active
+          << (*FirstDeviceType)->getClauseKind();
       return true;
     }
 
@@ -298,9 +305,11 @@ class SemaOpenACCClauseVisitor {
         << Clause.getClauseKind()
         << (*ExistingProhibitedSinceLastDevice)->getClauseKind();
     SemaRef.Diag((*ExistingProhibitedSinceLastDevice)->getBeginLoc(),
-                 diag::note_acc_previous_clause_here);
+                 diag::note_acc_previous_clause_here)
+        << (*ExistingProhibitedSinceLastDevice)->getClauseKind();
     SemaRef.Diag((*LastDeviceType)->getBeginLoc(),
-                 diag::note_acc_previous_clause_here);
+                 diag::note_acc_active_applies_clause_here)
+        << diag::ACCDeviceTypeApp::Active << (*LastDeviceType)->getClauseKind();
     return true;
   }
 
@@ -354,13 +363,17 @@ class SemaOpenACCClauseVisitor {
                    diag::err_acc_clause_since_last_device_type)
           << Clause.getClauseKind() << Clause.getDirectiveKind()
           << (LastDeviceTypeItr != ExistingClauses.rend());
+
       SemaRef.Diag((*LastSinceDevTy)->getBeginLoc(),
-                   diag::note_acc_previous_clause_here);
+                   diag::note_acc_previous_clause_here)
+          << (*LastSinceDevTy)->getClauseKind();
 
       // Mention the last device_type as well.
       if (LastDeviceTypeItr != ExistingClauses.rend())
         SemaRef.Diag((*LastDeviceTypeItr)->getBeginLoc(),
-                     diag::note_acc_previous_clause_here);
+                     diag::note_acc_active_applies_clause_here)
+            << diag::ACCDeviceTypeApp::Active
+            << (*LastDeviceTypeItr)->getClauseKind();
       return true;
     }
 
@@ -417,16 +430,18 @@ class SemaOpenACCClauseVisitor {
                                             : "*");
             // mention the active device type.
             SemaRef.Diag(ActiveDeviceTypeClause.getBeginLoc(),
-                         diag::note_acc_device_type_here)
-                << diag::ACCDeviceTypeApp::Active;
+                         diag::note_acc_active_applies_clause_here)
+                << diag::ACCDeviceTypeApp::Active
+                << ActiveDeviceTypeClause.getClauseKind();
             // mention the previous clause.
             SemaRef.Diag((*CurClauseKindItr)->getBeginLoc(),
-                         diag::note_acc_previous_named_clause_here)
+                         diag::note_acc_previous_clause_here)
                 << (*CurClauseKindItr)->getClauseKind();
             // mention the previous device type.
             SemaRef.Diag(CurDeviceTypeClause.getBeginLoc(),
-                         diag::note_acc_device_type_here)
-                << diag::ACCDeviceTypeApp::Applies;
+                         diag::note_acc_active_applies_clause_here)
+                << diag::ACCDeviceTypeApp::Applies
+                << CurDeviceTypeClause.getClauseKind();
             return true;
           }
         }
@@ -527,7 +542,8 @@ OpenACCClause *SemaOpenACCClauseVisitor::VisitIfClause(
         llvm::find_if(ExistingClauses, llvm::IsaPred<OpenACCSelfClause>);
     if (Itr != ExistingClauses.end()) {
       SemaRef.Diag(Clause.getBeginLoc(), diag::warn_acc_if_self_conflict);
-      SemaRef.Diag((*Itr)->getBeginLoc(), diag::note_acc_previous_clause_here);
+      SemaRef.Diag((*Itr)->getBeginLoc(), diag::note_acc_previous_clause_here)
+          << (*Itr)->getClauseKind();
     }
   }
 
@@ -550,7 +566,8 @@ OpenACCClause *SemaOpenACCClauseVisitor::VisitSelfClause(
       llvm::find_if(ExistingClauses, llvm::IsaPred<OpenACCIfClause>);
   if (Itr != ExistingClauses.end()) {
     SemaRef.Diag(Clause.getBeginLoc(), diag::warn_acc_if_self_conflict);
-    SemaRef.Diag((*Itr)->getBeginLoc(), diag::note_acc_previous_clause_here);
+    SemaRef.Diag((*Itr)->getBeginLoc(), diag::note_acc_previous_clause_here)
+        << (*Itr)->getClauseKind();
   }
   return OpenACCSelfClause::Create(
       Ctx, Clause.getBeginLoc(), Clause.getLParenLoc(),
@@ -599,9 +616,11 @@ OpenACCClause *SemaOpenACCClauseVisitor::VisitNumGangsClause(
           << OpenACCClauseKind::Reduction << OpenACCClauseKind::Gang
           << Clause.getDirectiveKind() << /*is on combined directive=*/1;
       SemaRef.Diag((*ReductionClauseItr)->getBeginLoc(),
-                   diag::note_acc_previous_clause_here);
+                   diag::note_acc_previous_clause_here)
+          << (*ReductionClauseItr)->getClauseKind();
       SemaRef.Diag((*GangClauseItr)->getBeginLoc(),
-                   diag::note_acc_previous_clause_here);
+                   diag::note_acc_previous_clause_here)
+          << (*GangClauseItr)->getClauseKind();
       return nullptr;
     }
   }
@@ -621,7 +640,8 @@ OpenACCClause *SemaOpenACCClauseVisitor::VisitNumGangsClause(
           << /*>1 arg in first loc=*/1 << Clause.getClauseKind()
           << Clause.getDirectiveKind() << OpenACCClauseKind::Reduction;
       SemaRef.Diag((*Parallel)->getBeginLoc(),
-                   diag::note_acc_previous_clause_here);
+                   diag::note_acc_previous_clause_here)
+          << (*Parallel)->getClauseKind();
       return nullptr;
     }
   }
@@ -639,7 +659,8 @@ OpenACCClause *SemaOpenACCClauseVisitor::VisitNumGangsClause(
                      diag::err_acc_num_arg_conflict_reverse)
             << OpenACCClauseKind::NumGangs << OpenACCClauseKind::Gang
             << /*Num argument*/ 1;
-        SemaRef.Diag(GC->getBeginLoc(), diag::note_acc_previous_clause_here);
+        SemaRef.Diag(GC->getBeginLoc(), diag::note_acc_previous_clause_here)
+            << GC->getClauseKind();
         return nullptr;
       }
     }
@@ -669,7 +690,8 @@ OpenACCClause *SemaOpenACCClauseVisitor::VisitNumWorkersClause(
                      diag::err_acc_num_arg_conflict_reverse)
             << OpenACCClauseKind::NumWorkers << OpenACCClauseKind::Worker
             << /*num argument*/ 0;
-        SemaRef.Diag(WC->getBeginLoc(), diag::note_acc_previous_clause_here);
+        SemaRef.Diag(WC->getBeginLoc(), diag::note_acc_previous_clause_here)
+            << WC->getClauseKind();
         return nullptr;
       }
     }
@@ -701,7 +723,8 @@ OpenACCClause *SemaOpenACCClauseVisitor::VisitVectorLengthClause(
                      diag::err_acc_num_arg_conflict_reverse)
             << OpenACCClauseKind::VectorLength << OpenACCClauseKind::Vector
             << /*num argument*/ 0;
-        SemaRef.Diag(VC->getBeginLoc(), diag::note_acc_previous_clause_here);
+        SemaRef.Diag(VC->getBeginLoc(), diag::note_acc_previous_clause_here)
+            << VC->getClauseKind();
         return nullptr;
       }
     }
@@ -1190,7 +1213,8 @@ ExprResult CheckGangKernelsExpr(SemaOpenACC &S,
           << HasAssocKind(DK, AssocKind) << AssocKind
           << OpenACCClauseKind::NumGangs;
 
-      S.Diag((*Itr)->getBeginLoc(), diag::note_acc_previous_clause_here);
+      S.Diag((*Itr)->getBeginLoc(), diag::note_acc_previous_clause_here)
+          << (*Itr)->getClauseKind();
       return ExprError();
     }
     return ExprResult{E};
@@ -1268,7 +1292,8 @@ OpenACCClause *SemaOpenACCClauseVisitor::VisitVectorClause(
               << SemaRef.getActiveComputeConstructInfo().Kind
               << OpenACCClauseKind::VectorLength;
           SemaRef.Diag((*Itr)->getBeginLoc(),
-                       diag::note_acc_previous_clause_here);
+                       diag::note_acc_previous_clause_here)
+              << (*Itr)->getClauseKind();
 
           IntExpr = nullptr;
         }
@@ -1289,8 +1314,8 @@ OpenACCClause *SemaOpenACCClauseVisitor::VisitVectorClause(
                             SemaRef.getActiveComputeConstructInfo().Kind)
             << SemaRef.getActiveComputeConstructInfo().Kind
             << OpenACCClauseKind::VectorLength;
-        SemaRef.Diag((*Itr)->getBeginLoc(),
-                     diag::note_acc_previous_clause_here);
+        SemaRef.Diag((*Itr)->getBeginLoc(), diag::note_acc_previous_clause_here)
+            << (*Itr)->getClauseKind();
 
         IntExpr = nullptr;
       }
@@ -1319,7 +1344,8 @@ OpenACCClause *SemaOpenACCClauseVisitor::VisitVectorClause(
           << OpenACCClauseKind::Vector << OpenACCClauseKind::Vector
           << /*skip kernels construct info*/ 0;
       SemaRef.Diag(SemaRef.LoopVectorClauseLoc,
-                   diag::note_acc_previous_clause_here);
+                   diag::note_acc_previous_clause_here)
+          << "vector";
       return nullptr;
     }
   }
@@ -1366,7 +1392,8 @@ OpenACCClause *SemaOpenACCClauseVisitor::VisitWorkerClause(
               << SemaRef.getActiveComputeConstructInfo().Kind
               << OpenACCClauseKind::NumWorkers;
           SemaRef.Diag((*Itr)->getBeginLoc(),
-                       diag::note_acc_previous_clause_here);
+                       diag::note_acc_previous_clause_here)
+              << (*Itr)->getClauseKind();
 
           IntExpr = nullptr;
         }
@@ -1394,8 +1421,8 @@ OpenACCClause *SemaOpenACCClauseVisitor::VisitWorkerClause(
                             SemaRef.getActiveComputeConstructInfo().Kind)
             << SemaRef.getActiveComputeConstructInfo().Kind
             << OpenACCClauseKind::NumWorkers;
-        SemaRef.Diag((*Itr)->getBeginLoc(),
-                     diag::note_acc_previous_clause_here);
+        SemaRef.Diag((*Itr)->getBeginLoc(), diag::note_acc_previous_clause_here)
+            << (*Itr)->getClauseKind();
 
         IntExpr = nullptr;
       }
@@ -1414,7 +1441,8 @@ OpenACCClause *SemaOpenACCClauseVisitor::VisitWorkerClause(
           << OpenACCClauseKind::Worker << OpenACCClauseKind::Worker
           << /*skip kernels construct info*/ 0;
       SemaRef.Diag(SemaRef.LoopWorkerClauseLoc,
-                   diag::note_acc_previous_clause_here);
+                   diag::note_acc_previous_clause_here)
+          << "worker";
       return nullptr;
     }
 
@@ -1428,7 +1456,8 @@ OpenACCClause *SemaOpenACCClauseVisitor::VisitWorkerClause(
           << OpenACCClauseKind::Worker << OpenACCClauseKind::Vector
           << /*skip kernels construct info*/ 0;
       SemaRef.Diag(SemaRef.LoopVectorClauseLoc,
-                   diag::note_acc_previous_clause_here);
+                   diag::note_acc_previous_clause_here)
+          << "vector";
       return nullptr;
     }
   }
@@ -1472,9 +1501,11 @@ OpenACCClause *SemaOpenACCClauseVisitor::VisitGangClause(
             << Clause.getDirectiveKind()
             << isOpenACCCombinedDirectiveKind(Clause.getDirectiveKind());
         SemaRef.Diag((*ReductionClauseItr)->getBeginLoc(),
-                     diag::note_acc_previous_clause_here);
+                     diag::note_acc_previous_clause_here)
+            << (*ReductionClauseItr)->getClauseKind();
         SemaRef.Diag((*NumGangsClauseItr)->getBeginLoc(),
-                     diag::note_acc_previous_clause_here);
+                     diag::note_acc_previous_clause_here)
+            << (*NumGangsClauseItr)->getClauseKind();
         return nullptr;
       }
     }
@@ -1524,7 +1555,8 @@ OpenACCClause *SemaOpenACCClauseVisitor::VisitGangClause(
           << /*kernels construct info*/ 1
           << SemaRef.LoopGangClauseOnKernel.DirKind;
       SemaRef.Diag(SemaRef.LoopGangClauseOnKernel.Loc,
-                   diag::note_acc_previous_clause_here);
+                   diag::note_acc_previous_clause_here)
+          << "gang";
       return nullptr;
     }
 
@@ -1538,7 +1570,8 @@ OpenACCClause *SemaOpenACCClauseVisitor::VisitGangClause(
           << OpenACCClauseKind::Gang << OpenACCClauseKind::Worker
           << /*!kernels construct info*/ 0;
       SemaRef.Diag(SemaRef.LoopWorkerClauseLoc,
-                   diag::note_acc_previous_clause_here);
+                   diag::note_acc_previous_clause_here)
+          << "worker";
       return nullptr;
     }
 
@@ -1552,7 +1585,8 @@ OpenACCClause *SemaOpenACCClauseVisitor::VisitGangClause(
           << OpenACCClauseKind::Gang << OpenACCClauseKind::Vector
           << /*!kernels construct info*/ 0;
       SemaRef.Diag(SemaRef.LoopVectorClauseLoc,
-                   diag::note_acc_previous_clause_here);
+                   diag::note_acc_previous_clause_here)
+          << "vector";
       return nullptr;
     }
   }
@@ -1592,7 +1626,8 @@ OpenACCClause *SemaOpenACCClauseVisitor::VisitSeqClause(
       SemaRef.Diag(Clause.getBeginLoc(), diag::err_acc_clause_cannot_combine)
           << Clause.getClauseKind() << (*Itr)->getClauseKind()
           << Clause.getDirectiveKind();
-      SemaRef.Diag((*Itr)->getBeginLoc(), diag::note_acc_previous_clause_here);
+      SemaRef.Diag((*Itr)->getBeginLoc(), diag::note_acc_previous_clause_here)
+          << (*Itr)->getClauseKind();
       return nullptr;
     }
   }
@@ -1631,9 +1666,11 @@ OpenACCClause *SemaOpenACCClauseVisitor::VisitReductionClause(
             << Clause.getDirectiveKind()
             << isOpenACCCombinedDirectiveKind(Clause.getDirectiveKind());
         SemaRef.Diag((*GangClauseItr)->getBeginLoc(),
-                     diag::note_acc_previous_clause_here);
+                     diag::note_acc_previous_clause_here)
+            << (*GangClauseItr)->getClauseKind();
         SemaRef.Diag((*NumGangsClauseItr)->getBeginLoc(),
-                     diag::note_acc_previous_clause_here);
+                     diag::note_acc_previous_clause_here)
+            << (*NumGangsClauseItr)->getClauseKind();
         return nullptr;
       }
     }
@@ -1673,7 +1710,8 @@ OpenACCClause *SemaOpenACCClauseVisitor::VisitReductionClause(
                      diag::err_acc_reduction_num_gangs_conflict)
             << /*>1 arg in first loc=*/0 << Clause.getClauseKind()
             << Clause.getDirectiveKind() << OpenACCClauseKind::NumGangs;
-        SemaRef.Diag(NGC->getBeginLoc(), diag::note_acc_previous_clause_here);
+        SemaRef.Diag(NGC->getBeginLoc(), diag::note_acc_previous_clause_here)
+            << NGC->getClauseKind();
         return nullptr;
       }
     }
@@ -1891,7 +1929,8 @@ ExprResult SemaOpenACC::CheckReductionVar(OpenACCDirectiveKind DirectiveKind,
         if (areVarsEqual(VarExpr, OldVarExpr)) {
           Diag(VarExpr->getExprLoc(), diag::err_reduction_op_mismatch)
               << ReductionOp << RClause->getReductionOp();
-          Diag(OldVarExpr->getExprLoc(), diag::note_acc_previous_clause_here);
+          Diag(OldVarExpr->getExprLoc(), diag::note_acc_previous_clause_here)
+              << RClause->getClauseKind();
           return ExprError();
         }
       }
@@ -2033,7 +2072,8 @@ SemaOpenACC::CheckGangClause(OpenACCDirectiveKind DirKind,
           Diag(DimVal->getBeginLoc(), diag::err_acc_gang_reduction_conflict)
               << /*gang/reduction=*/0 << DirKind;
           Diag((*ReductionItr)->getBeginLoc(),
-               diag::note_acc_previous_clause_here);
+               diag::note_acc_previous_clause_here)
+              << (*ReductionItr)->getClauseKind();
           return nullptr;
         }
       }
@@ -2068,7 +2108,8 @@ OpenACCClause *SemaOpenACC::CheckReductionClause(
             DimVal && DimVal->getResultAsAPSInt() > 1) {
           Diag(BeginLoc, diag::err_acc_gang_reduction_conflict)
               << /*reduction/gang=*/1 << DirectiveKind;
-          Diag(GangClause->getBeginLoc(), diag::note_acc_previous_clause_here);
+          Diag(GangClause->getBeginLoc(), diag::note_acc_previous_clause_here)
+              << GangClause->getClauseKind();
           return nullptr;
         }
       }

diff  --git a/clang/lib/Sema/SemaOpenACCClauseAppertainment.cpp b/clang/lib/Sema/SemaOpenACCClauseAppertainment.cpp
index 6069c77d01676..9b404462438b8 100644
--- a/clang/lib/Sema/SemaOpenACCClauseAppertainment.cpp
+++ b/clang/lib/Sema/SemaOpenACCClauseAppertainment.cpp
@@ -179,7 +179,7 @@ bool SemaOpenACC::DiagnoseAllowedOnceClauses(
     return false;
 
   Diag(ClauseLoc, diag::err_acc_duplicate_clause_disallowed) << DK << CK;
-  Diag((*Res)->getBeginLoc(), diag::note_acc_previous_clause_here);
+  Diag((*Res)->getBeginLoc(), diag::note_acc_previous_clause_here) << CK;
   return true;
 }
 
@@ -202,7 +202,8 @@ bool SemaOpenACC::DiagnoseExclusiveClauses(
     if (Lists.AllowedExclusive.isSet(dealiasClauseKind(C->getClauseKind()))) {
       Diag(ClauseLoc, diag::err_acc_clause_cannot_combine)
           << CK << C->getClauseKind() << DK;
-      Diag(C->getBeginLoc(), diag::note_acc_previous_clause_here);
+      Diag(C->getBeginLoc(), diag::note_acc_previous_clause_here)
+          << C->getClauseKind();
 
       return true;
     }

diff  --git a/clang/test/ParserOpenACC/parse-clauses.c b/clang/test/ParserOpenACC/parse-clauses.c
index 716d9cffab3f6..52d5828c510ba 100644
--- a/clang/test/ParserOpenACC/parse-clauses.c
+++ b/clang/test/ParserOpenACC/parse-clauses.c
@@ -28,41 +28,41 @@ void func() {
 #pragma acc host_data if_present, if_present
 
   // expected-error at +4{{OpenACC clause 'independent' may not appear on the same construct as a 'seq' clause on a 'loop' construct}}
-  // expected-note at +3{{previous clause is here}}
+  // expected-note at +3{{previous 'seq' clause is here}}
   // expected-error at +2{{OpenACC clause 'auto' may not appear on the same construct as a 'seq' clause on a 'loop' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'seq' clause is here}}
 #pragma acc loop seq independent auto
   for(int i = 0; i < 5;++i) {}
 
   // expected-error at +4{{OpenACC clause 'independent' may not appear on the same construct as a 'seq' clause on a 'loop' construct}}
-  // expected-note at +3{{previous clause is here}}
+  // expected-note at +3{{previous 'seq' clause is here}}
   // expected-error at +2{{OpenACC clause 'auto' may not appear on the same construct as a 'seq' clause on a 'loop' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'seq' clause is here}}
 #pragma acc loop seq, independent auto
   for(int i = 0; i < 5;++i) {}
 
   // expected-error at +4{{OpenACC clause 'independent' may not appear on the same construct as a 'seq' clause on a 'loop' construct}}
-  // expected-note at +3{{previous clause is here}}
+  // expected-note at +3{{previous 'seq' clause is here}}
   // expected-error at +2{{OpenACC clause 'auto' may not appear on the same construct as a 'seq' clause on a 'loop' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'seq' clause is here}}
 #pragma acc loop seq independent, auto
   for(int i = 0; i < 5;++i) {}
 
   // expected-error at +3{{OpenACC clause 'independent' may not appear on the same construct as a 'seq' clause on a 'kernels loop' construct}}
   // expected-error at +2{{OpenACC clause 'auto' may not appear on the same construct as a 'seq' clause on a 'kernels loop' construct}}
-  // expected-note at +1 2{{previous clause is here}}
+  // expected-note at +1 2{{previous 'seq' clause is here}}
 #pragma acc kernels loop seq independent auto
   for(int i = 0; i < 5;++i) {}
 
   // expected-error at +3{{OpenACC clause 'independent' may not appear on the same construct as a 'seq' clause on a 'serial loop' construct}}
   // expected-error at +2{{OpenACC clause 'auto' may not appear on the same construct as a 'seq' clause on a 'serial loop' construct}}
-  // expected-note at +1 2{{previous clause is here}}
+  // expected-note at +1 2{{previous 'seq' clause is here}}
 #pragma acc serial loop seq, independent auto
   for(int i = 0; i < 5;++i) {}
 
   // expected-error at +3{{OpenACC clause 'independent' may not appear on the same construct as a 'seq' clause on a 'parallel loop' construct}}
   // expected-error at +2{{OpenACC clause 'auto' may not appear on the same construct as a 'seq' clause on a 'parallel loop' construct}}
-  // expected-note at +1 2{{previous clause is here}}
+  // expected-note at +1 2{{previous 'seq' clause is here}}
 #pragma acc parallel loop seq independent, auto
   for(int i = 0; i < 5;++i) {}
 
@@ -1326,16 +1326,16 @@ void Gang() {
 }
 
   // expected-error at +4{{OpenACC clause 'seq' may not appear on the same construct as a 'worker' clause on a 'routine' construct}}
-  // expected-note at +3{{previous clause is here}}
+  // expected-note at +3{{previous 'worker' clause is here}}
   // expected-error at +2{{OpenACC clause 'vector' may not appear on the same construct as a 'worker' clause on a 'routine' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'worker' clause is here}}
 #pragma acc routine worker, vector, seq, nohost
 void bar();
 
   // expected-error at +4{{OpenACC clause 'seq' may not appear on the same construct as a 'worker' clause on a 'routine' construct}}
-  // expected-note at +3{{previous clause is here}}
+  // expected-note at +3{{previous 'worker' clause is here}}
   // expected-error at +2{{OpenACC clause 'vector' may not appear on the same construct as a 'worker' clause on a 'routine' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'worker' clause is here}}
 #pragma acc routine(bar) worker, vector, seq, nohost
 
 

diff  --git a/clang/test/SemaOpenACC/atomic-construct.cpp b/clang/test/SemaOpenACC/atomic-construct.cpp
index 83fbc4bff2ec5..eba2559bfe4eb 100644
--- a/clang/test/SemaOpenACC/atomic-construct.cpp
+++ b/clang/test/SemaOpenACC/atomic-construct.cpp
@@ -66,7 +66,7 @@ void IfClause(int x, int v) {
   x = v;
 
   // expected-error at +2{{OpenACC 'if' clause cannot appear more than once on a 'atomic' directive}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'if' clause is here}}
 #pragma acc atomic read if(x) if (v)
   x = v;
 }

diff  --git a/clang/test/SemaOpenACC/combined-construct-auto_seq_independent-clauses.c b/clang/test/SemaOpenACC/combined-construct-auto_seq_independent-clauses.c
index 5c64c621b0e7e..6d5c916506cc3 100644
--- a/clang/test/SemaOpenACC/combined-construct-auto_seq_independent-clauses.c
+++ b/clang/test/SemaOpenACC/combined-construct-auto_seq_independent-clauses.c
@@ -9,27 +9,27 @@ void uses() {
   for(unsigned i = 0; i < 5; ++i);
 
   // expected-error at +2{{OpenACC clause 'seq' may not appear on the same construct as a 'auto' clause on a 'parallel loop' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'auto' clause is here}}
 #pragma acc parallel loop auto seq
   for(unsigned i = 0; i < 5; ++i);
   // expected-error at +2{{OpenACC clause 'independent' may not appear on the same construct as a 'auto' clause on a 'parallel loop' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'auto' clause is here}}
 #pragma acc parallel loop auto independent
   for(unsigned i = 0; i < 5; ++i);
   // expected-error at +2{{OpenACC clause 'auto' may not appear on the same construct as a 'seq' clause on a 'parallel loop' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'seq' clause is here}}
 #pragma acc parallel loop seq auto
   for(unsigned i = 0; i < 5; ++i);
   // expected-error at +2{{OpenACC clause 'independent' may not appear on the same construct as a 'seq' clause on a 'parallel loop' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'seq' clause is here}}
 #pragma acc parallel loop seq independent
   for(unsigned i = 0; i < 5; ++i);
   // expected-error at +2{{OpenACC clause 'auto' may not appear on the same construct as a 'independent' clause on a 'parallel loop' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'independent' clause is here}}
 #pragma acc parallel loop independent auto
   for(unsigned i = 0; i < 5; ++i);
   // expected-error at +2{{OpenACC clause 'seq' may not appear on the same construct as a 'independent' clause on a 'parallel loop' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'independent' clause is here}}
 #pragma acc parallel loop independent seq
   for(unsigned i = 0; i < 5; ++i);
 
@@ -508,15 +508,15 @@ void uses() {
 
   // 'seq' cannot be combined with 'gang', 'worker' or 'vector'
   // expected-error at +2{{OpenACC clause 'gang' may not appear on the same construct as a 'seq' clause on a 'parallel loop' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'seq' clause is here}}
 #pragma acc parallel loop seq gang
   for(unsigned i = 0; i < 5; ++i);
   // expected-error at +2{{OpenACC clause 'worker' may not appear on the same construct as a 'seq' clause on a 'parallel loop' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'seq' clause is here}}
 #pragma acc parallel loop seq worker
   for(unsigned i = 0; i < 5; ++i);
   // expected-error at +2{{OpenACC clause 'vector' may not appear on the same construct as a 'seq' clause on a 'parallel loop' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'seq' clause is here}}
 #pragma acc parallel loop seq vector
   for(unsigned i = 0; i < 5; ++i);
   // expected-error at +1{{OpenACC 'finalize' clause is not valid on 'parallel loop' directive}}
@@ -631,15 +631,15 @@ void uses() {
   for(unsigned i = 0; i < 5; ++i);
 
   // expected-error at +2{{OpenACC clause 'seq' may not appear on the same construct as a 'gang' clause on a 'parallel loop' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'gang' clause is here}}
 #pragma acc parallel loop gang seq
   for(unsigned i = 0; i < 5; ++i);
   // expected-error at +2{{OpenACC clause 'seq' may not appear on the same construct as a 'worker' clause on a 'parallel loop' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'worker' clause is here}}
 #pragma acc parallel loop worker seq
   for(unsigned i = 0; i < 5; ++i);
   // expected-error at +2{{OpenACC clause 'seq' may not appear on the same construct as a 'vector' clause on a 'parallel loop' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'vector' clause is here}}
 #pragma acc parallel loop vector seq
   for(unsigned i = 0; i < 5; ++i);
   // expected-error at +1{{OpenACC 'finalize' clause is not valid on 'parallel loop' directive}}

diff  --git a/clang/test/SemaOpenACC/combined-construct-default-clause.c b/clang/test/SemaOpenACC/combined-construct-default-clause.c
index 2d77faa442a62..ffa7fdac6f9fa 100644
--- a/clang/test/SemaOpenACC/combined-construct-default-clause.c
+++ b/clang/test/SemaOpenACC/combined-construct-default-clause.c
@@ -5,19 +5,19 @@ void SingleOnly() {
   for(int i = 5; i < 10;++i);
 
   // expected-error at +2{{OpenACC 'default' clause cannot appear more than once on a 'serial loop' directive}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'default' clause is here}}
   #pragma acc serial loop default(present) self default(none)
   for(int i = 5; i < 10;++i);
 
   int i;
 
   // expected-error at +2{{OpenACC 'default' clause cannot appear more than once on a 'kernels loop' directive}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'default' clause is here}}
   #pragma acc kernels loop self default(present) present(i) default(none) copy(i)
   for(int i = 5; i < 10;++i);
 
   // expected-error at +2{{OpenACC 'default' clause cannot appear more than once on a 'parallel loop' directive}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'default' clause is here}}
   #pragma acc parallel loop self default(present) private(i) default(none) copy(i)
   for(int i = 0; i < 5; ++i);
 

diff  --git a/clang/test/SemaOpenACC/combined-construct-default-clause.cpp b/clang/test/SemaOpenACC/combined-construct-default-clause.cpp
index 60c4d21712e68..b933e36eb5956 100644
--- a/clang/test/SemaOpenACC/combined-construct-default-clause.cpp
+++ b/clang/test/SemaOpenACC/combined-construct-default-clause.cpp
@@ -8,17 +8,17 @@ void SingleOnly() {
   int i;
 
   // expected-error at +2{{OpenACC 'default' clause cannot appear more than once on a 'parallel loop' directive}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'default' clause is here}}
   #pragma acc parallel loop default(present) async default(none)
   for (unsigned I = 0; I < 5; ++I);
 
   // expected-error at +2{{OpenACC 'default' clause cannot appear more than once on a 'serial loop' directive}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'default' clause is here}}
   #pragma acc serial loop async default(present) copy(i) default(none) self
   for (unsigned I = 0; I < 5; ++I);
 
   // expected-error at +2{{OpenACC 'default' clause cannot appear more than once on a 'kernels loop' directive}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'default' clause is here}}
   #pragma acc kernels loop async default(present) copy(i) default(none) self
   for (unsigned I = 0; I < 5; ++I);
 

diff  --git a/clang/test/SemaOpenACC/combined-construct-device_type-clause.c b/clang/test/SemaOpenACC/combined-construct-device_type-clause.c
index 92174b2d55cf1..7bc8efbccd3fb 100644
--- a/clang/test/SemaOpenACC/combined-construct-device_type-clause.c
+++ b/clang/test/SemaOpenACC/combined-construct-device_type-clause.c
@@ -60,37 +60,37 @@ void uses() {
 #pragma acc serial loop device_type(*) nohost
   for(int i = 0; i < 5; ++i);
   // expected-error at +2{{OpenACC clause 'default' may not follow a 'device_type' clause in a 'kernels loop' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc kernels loop device_type(*) default(none)
   for(int i = 0; i < 5; ++i);
   // expected-error at +2{{OpenACC clause 'if' may not follow a 'device_type' clause in a 'parallel loop' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc parallel loop device_type(*) if(1)
   for(int i = 0; i < 5; ++i);
   // expected-error at +2{{OpenACC clause 'self' may not follow a 'device_type' clause in a 'serial loop' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc serial loop device_type(*) self
   for(int i = 0; i < 5; ++i);
 
   int Var;
   int *VarPtr;
   // expected-error at +2{{OpenACC clause 'copy' may not follow a 'device_type' clause in a 'kernels loop' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc kernels loop device_type(*) copy(Var)
   for(int i = 0; i < 5; ++i);
   // expected-error at +2{{OpenACC clause 'pcopy' may not follow a 'device_type' clause in a 'parallel loop' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc parallel loop device_type(*) pcopy(Var)
   for(int i = 0; i < 5; ++i);
   // expected-error at +2{{OpenACC clause 'present_or_copy' may not follow a 'device_type' clause in a 'serial loop' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc serial loop device_type(*) present_or_copy(Var)
   for(int i = 0; i < 5; ++i);
   // expected-error at +1{{OpenACC 'use_device' clause is not valid on 'kernels loop' directive}}
 #pragma acc kernels loop device_type(*) use_device(Var)
   for(int i = 0; i < 5; ++i);
   // expected-error at +2{{OpenACC clause 'attach' may not follow a 'device_type' clause in a 'parallel loop' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc parallel loop device_type(*) attach(Var)
   for(int i = 0; i < 5; ++i);
   // expected-error at +1{{OpenACC 'delete' clause is not valid on 'serial loop' directive}}
@@ -103,14 +103,14 @@ void uses() {
 #pragma acc parallel loop device_type(*) device(VarPtr)
   for(int i = 0; i < 5; ++i);
   // expected-error at +2{{OpenACC clause 'deviceptr' may not follow a 'device_type' clause in a 'serial loop' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc serial loop device_type(*) deviceptr(VarPtr)
   for(int i = 0; i < 5; ++i);
   // expected-error at +1{{OpenACC 'device_resident' clause is not valid on 'kernels loop' directive}}
 #pragma acc kernels loop device_type(*)  device_resident(VarPtr)
   for(int i = 0; i < 5; ++i);
   // expected-error at +2{{OpenACC clause 'firstprivate' may not follow a 'device_type' clause in a 'parallel loop' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc parallel loop device_type(*) firstprivate(Var)
   for(int i = 0; i < 5; ++i);
   // expected-error at +1{{OpenACC 'host' clause is not valid on 'serial loop' directive}}
@@ -120,55 +120,55 @@ void uses() {
 #pragma acc parallel loop device_type(*) link(Var)
   for(int i = 0; i < 5; ++i);
   // expected-error at +2{{OpenACC clause 'no_create' may not follow a 'device_type' clause in a 'serial loop' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc serial loop device_type(*) no_create(Var)
   for(int i = 0; i < 5; ++i);
   // expected-error at +2{{OpenACC clause 'present' may not follow a 'device_type' clause in a 'kernels loop' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc kernels loop device_type(*) present(Var)
   for(int i = 0; i < 5; ++i);
   // expected-error at +2{{OpenACC clause 'private' may not follow a 'device_type' clause in a 'parallel loop' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc parallel loop device_type(*) private(Var)
   for(int i = 0; i < 5; ++i);
   // expected-error at +2{{OpenACC clause 'copyout' may not follow a 'device_type' clause in a 'serial loop' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc serial loop device_type(*) copyout(Var)
   for(int i = 0; i < 5; ++i);
   // expected-error at +2{{OpenACC clause 'pcopyout' may not follow a 'device_type' clause in a 'serial loop' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc serial loop device_type(*) pcopyout(Var)
   for(int i = 0; i < 5; ++i);
   // expected-error at +2{{OpenACC clause 'present_or_copyout' may not follow a 'device_type' clause in a 'parallel loop' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc parallel loop device_type(*) present_or_copyout(Var)
   for(int i = 0; i < 5; ++i);
   // expected-error at +2{{OpenACC clause 'copyin' may not follow a 'device_type' clause in a 'serial loop' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc serial loop device_type(*) copyin(Var)
   for(int i = 0; i < 5; ++i);
   // expected-error at +2{{OpenACC clause 'pcopyin' may not follow a 'device_type' clause in a 'serial loop' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc serial loop device_type(*) pcopyin(Var)
   for(int i = 0; i < 5; ++i);
   // expected-error at +2{{OpenACC clause 'present_or_copyin' may not follow a 'device_type' clause in a 'parallel loop' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc parallel loop device_type(*) present_or_copyin(Var)
   for(int i = 0; i < 5; ++i);
   // expected-error at +2{{OpenACC clause 'create' may not follow a 'device_type' clause in a 'serial loop' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc serial loop device_type(*) create(Var)
   for(int i = 0; i < 5; ++i);
   // expected-error at +2{{OpenACC clause 'pcreate' may not follow a 'device_type' clause in a 'serial loop' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc serial loop device_type(*) pcreate(Var)
   for(int i = 0; i < 5; ++i);
   // expected-error at +2{{OpenACC clause 'present_or_create' may not follow a 'device_type' clause in a 'parallel loop' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc parallel loop device_type(*) present_or_create(Var)
   for(int i = 0; i < 5; ++i);
   // expected-error at +2{{OpenACC clause 'reduction' may not follow a 'device_type' clause in a 'serial loop' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc serial loop device_type(*) reduction(+:Var)
   for(int i = 0; i < 5; ++i);
 #pragma acc serial loop device_type(*) collapse(1)

diff  --git a/clang/test/SemaOpenACC/combined-construct-gang-clause.cpp b/clang/test/SemaOpenACC/combined-construct-gang-clause.cpp
index c5346c4cf5b90..ba4e85b97ed7a 100644
--- a/clang/test/SemaOpenACC/combined-construct-gang-clause.cpp
+++ b/clang/test/SemaOpenACC/combined-construct-gang-clause.cpp
@@ -182,7 +182,7 @@ void KernelsTempl() {
   for(int i = 0; i < 5; ++i);
 
   // expected-error at +2{{'num_gangs' clause not allowed on a 'kernels loop' construct that has a 'gang' clause with a 'num' argument}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'gang' clause is here}}
 #pragma acc kernels loop gang(t) num_gangs(t)
   for(int i = 0; i < 5; ++i);
 
@@ -192,17 +192,17 @@ void KernelsTempl() {
   for(int i = 0; i < 5; ++i);
 
   // expected-error at +2{{'num' argument to 'gang' clause not allowed on a 'kernels loop' construct that has a 'num_gangs' clause}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'num_gangs' clause is here}}
 #pragma acc kernels loop num_gangs(t) gang(t)
   for(int i = 0; i < 5; ++i);
 
   // expected-error at +2{{'num_gangs' clause not allowed on a 'kernels loop' construct that has a 'gang' clause with a 'num' argument}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'gang' clause is here}}
 #pragma acc kernels loop gang(num:t) num_gangs(t)
   for(int i = 0; i < 5; ++i);
 
   // expected-error at +2{{'num' argument to 'gang' clause not allowed on a 'kernels loop' construct that has a 'num_gangs' clause}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'num_gangs' clause is here}}
 #pragma acc kernels loop num_gangs(t) gang(num:t)
   for(int i = 0; i < 5; ++i);
 }
@@ -219,22 +219,22 @@ void Kernels() {
   for(int i = 0; i < 5; ++i);
 
   // expected-error at +2{{'num_gangs' clause not allowed on a 'kernels loop' construct that has a 'gang' clause with a 'num' argument}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'gang' clause is here}}
 #pragma acc kernels loop gang(t) num_gangs(t)
   for(int i = 0; i < 5; ++i);
 
   // expected-error at +2{{'num' argument to 'gang' clause not allowed on a 'kernels loop' construct that has a 'num_gangs' clause}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'num_gangs' clause is here}}
 #pragma acc kernels loop num_gangs(t) gang(t)
   for(int i = 0; i < 5; ++i);
 
   // expected-error at +2{{'num_gangs' clause not allowed on a 'kernels loop' construct that has a 'gang' clause with a 'num' argument}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'gang' clause is here}}
 #pragma acc kernels loop gang(num:t) num_gangs(t)
   for(int i = 0; i < 5; ++i);
 
   // expected-error at +2{{'num' argument to 'gang' clause not allowed on a 'kernels loop' construct that has a 'num_gangs' clause}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'num_gangs' clause is here}}
 #pragma acc kernels loop num_gangs(t) gang(num:t)
   for(int i = 0; i < 5; ++i);
 
@@ -260,7 +260,7 @@ void Kernels() {
 #pragma acc kernels loop gang(num:1)
   for(int i = 0; i < 5; ++i) {
     // expected-error at +2{{loop with a 'gang' clause may not exist in the region of a 'gang' clause on a 'kernels loop' construct}}
-    // expected-note at -3{{previous clause is here}}
+    // expected-note at -3{{previous 'gang' clause is here}}
 #pragma acc loop gang(static:1)
     for(int i = 0; i < 5; ++i);
   }

diff  --git a/clang/test/SemaOpenACC/combined-construct-num_gangs-clause.c b/clang/test/SemaOpenACC/combined-construct-num_gangs-clause.c
index cd06f5e05ee69..4a22102fb05fd 100644
--- a/clang/test/SemaOpenACC/combined-construct-num_gangs-clause.c
+++ b/clang/test/SemaOpenACC/combined-construct-num_gangs-clause.c
@@ -14,24 +14,24 @@ void Test() {
   for(int i = 5; i < 10;++i);
 
   // expected-error at +2{{OpenACC 'num_gangs' clause cannot appear more than once on a 'kernels loop' directive}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'num_gangs' clause is here}}
 #pragma acc kernels loop num_gangs(1) num_gangs(2)
   for(int i = 5; i < 10;++i);
 
   // expected-error at +2{{OpenACC 'num_gangs' clause cannot appear more than once on a 'parallel loop' directive}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'num_gangs' clause is here}}
 #pragma acc parallel loop num_gangs(1) num_gangs(2)
   for(int i = 5; i < 10;++i);
 
   // expected-error at +3{{OpenACC 'num_gangs' clause cannot appear more than once in a 'device_type' region on a 'kernels loop' directive}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'num_gangs' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc kernels loop num_gangs(1) device_type(*) num_gangs(1) num_gangs(2)
   for(int i = 5; i < 10;++i);
 
   // expected-error at +3{{OpenACC 'num_gangs' clause cannot appear more than once in a 'device_type' region on a 'parallel loop' directive}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'num_gangs' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc parallel loop device_type(*) num_gangs(1) num_gangs(2)
   for(int i = 5; i < 10;++i);
 

diff  --git a/clang/test/SemaOpenACC/combined-construct-num_workers-clause.c b/clang/test/SemaOpenACC/combined-construct-num_workers-clause.c
index c3b648e438081..0ff623ccedd3d 100644
--- a/clang/test/SemaOpenACC/combined-construct-num_workers-clause.c
+++ b/clang/test/SemaOpenACC/combined-construct-num_workers-clause.c
@@ -14,24 +14,24 @@ void Test() {
   for(int i = 5; i < 10;++i);
 
   // expected-error at +2{{OpenACC 'num_workers' clause cannot appear more than once on a 'kernels loop' directive}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'num_workers' clause is here}}
 #pragma acc kernels loop num_workers(1) num_workers(2)
   for(int i = 5; i < 10;++i);
 
   // expected-error at +2{{OpenACC 'num_workers' clause cannot appear more than once on a 'parallel loop' directive}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'num_workers' clause is here}}
 #pragma acc parallel loop num_workers(1) num_workers(2)
   for(int i = 5; i < 10;++i);
 
   // expected-error at +3{{OpenACC 'num_workers' clause cannot appear more than once in a 'device_type' region on a 'kernels loop' directive}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'num_workers' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc kernels loop num_workers(1) device_type(*) num_workers(1) num_workers(2)
   for(int i = 5; i < 10;++i);
 
   // expected-error at +3{{OpenACC 'num_workers' clause cannot appear more than once in a 'device_type' region on a 'parallel loop' directive}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'num_workers' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc parallel loop device_type(*) num_workers(1) num_workers(2)
   for(int i = 5; i < 10;++i);
 

diff  --git a/clang/test/SemaOpenACC/combined-construct-reduction-clause.cpp b/clang/test/SemaOpenACC/combined-construct-reduction-clause.cpp
index 082f1ed67a86f..7b1a61e526871 100644
--- a/clang/test/SemaOpenACC/combined-construct-reduction-clause.cpp
+++ b/clang/test/SemaOpenACC/combined-construct-reduction-clause.cpp
@@ -47,14 +47,14 @@ void uses(unsigned Parm) {
 #pragma acc kernels loop reduction(+:Parm) num_gangs(I)
   for(int i = 0; i < 5; ++i);
   // expected-error at +2{{OpenACC 'num_gangs' clause with more than 1 argument may not appear on a 'parallel loop' construct with a 'reduction' clause}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'reduction' clause is here}}
 #pragma acc parallel loop reduction(+:Parm) num_gangs(I, I)
   for(int i = 0; i < 5; ++i);
 
 #pragma acc kernels loop num_gangs(I) reduction(+:Parm)
   for(int i = 0; i < 5; ++i);
   // expected-error at +2{{OpenACC 'reduction' clause may not appear on a 'parallel loop' construct with a 'num_gangs' clause with more than 1 argument}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'num_gangs' clause is here}}
 #pragma acc parallel loop num_gangs(I, I) reduction(+:Parm)
   for(int i = 0; i < 5; ++i);
 
@@ -62,13 +62,13 @@ void uses(unsigned Parm) {
 #pragma acc parallel loop gang(dim:1) reduction(+:Parm)
   for(int i = 0; i < 5; ++i);
   // expected-error at +2{{OpenACC 'reduction' clause cannot appear on the same 'parallel loop' construct as a 'gang' clause with a 'dim' value greater than 1}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'gang' clause is here}}
 #pragma acc parallel loop gang(dim:2) reduction(+:Parm)
   for(int i = 0; i < 5; ++i);
 #pragma acc parallel loop reduction(+:Parm) gang(dim:1)
   for(int i = 0; i < 5; ++i);
   // expected-error at +2{{OpenACC 'gang' clause with a 'dim' value greater than 1 cannot appear on the same 'parallel loop' construct as a 'reduction' clause}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'reduction' clause is here}}
 #pragma acc parallel loop reduction(+:Parm) gang(dim:2)
   for(int i = 0; i < 5; ++i);
 
@@ -88,31 +88,31 @@ void uses(unsigned Parm) {
   for(int i = 0; i < 5; ++i);
 
   // expected-error at +2{{OpenACC 'reduction' clause may not appear on a 'parallel loop' construct with a 'num_gangs' clause with more than 1 argument}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'num_gangs' clause is here}}
 #pragma acc parallel loop num_gangs(I, I) reduction(+:Parm) gang
   for(int i = 0; i < 5; ++i);
   // expected-error at +3{{OpenACC 'reduction' clause cannot appear on the same 'parallel loop' construct as a 'gang' clause and a 'num_gangs' clause with more than one argument}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'num_gangs' clause is here}}
+  // expected-note at +1{{previous 'gang' clause is here}}
 #pragma acc parallel loop num_gangs(I, I) gang reduction(+:Parm)
   for(int i = 0; i < 5; ++i);
   // expected-error at +2{{OpenACC 'num_gangs' clause with more than 1 argument may not appear on a 'parallel loop' construct with a 'reduction' clause}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'reduction' clause is here}}
 #pragma acc parallel loop reduction(+:Parm) num_gangs(I, I) gang
   for(int i = 0; i < 5; ++i);
   // expected-error at +3{{OpenACC 'reduction' clause cannot appear on the same 'parallel loop' construct as a 'gang' clause and a 'num_gangs' clause with more than one argument}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'reduction' clause is here}}
+  // expected-note at +1{{previous 'gang' clause is here}}
 #pragma acc parallel loop reduction(+:Parm) gang num_gangs(I, I)
   for(int i = 0; i < 5; ++i);
   // expected-error at +3{{OpenACC 'reduction' clause cannot appear on the same 'parallel loop' construct as a 'gang' clause and a 'num_gangs' clause with more than one argument}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'gang' clause is here}}
+  // expected-note at +1{{previous 'num_gangs' clause is here}}
 #pragma acc parallel loop gang num_gangs(I, I) reduction(+:Parm)
   for(int i = 0; i < 5; ++i);
   // expected-error at +3{{OpenACC 'reduction' clause cannot appear on the same 'parallel loop' construct as a 'gang' clause and a 'num_gangs' clause with more than one argument}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'reduction' clause is here}}
+  // expected-note at +1{{previous 'gang' clause is here}}
 #pragma acc parallel loop gang reduction(+:Parm) num_gangs(I, I)
   for(int i = 0; i < 5; ++i);
 
@@ -132,14 +132,14 @@ void uses(unsigned Parm) {
 #pragma acc parallel loop reduction(+:I)
   for(int i = 0; i < 5; ++i) {
   // expected-error at +2{{OpenACC 'reduction' variable must have the same operator in all nested constructs (& vs +)}}
-  // expected-note at -3{{previous clause is here}}
+  // expected-note at -3{{previous 'reduction' clause is here}}
 #pragma acc loop reduction(&:I)
     for(int i = 0; i < 5; ++i);
   }
 #pragma acc parallel loop reduction(+:I)
   for(int i = 0; i < 5; ++i) {
   // expected-error at +2{{OpenACC 'reduction' variable must have the same operator in all nested constructs (& vs +)}}
-  // expected-note at -3{{previous clause is here}}
+  // expected-note at -3{{previous 'reduction' clause is here}}
 #pragma acc parallel reduction(&:I)
     for(int i = 0; i < 5; ++i);
   }
@@ -147,14 +147,14 @@ void uses(unsigned Parm) {
 #pragma acc parallel loop reduction(+:I)
   for(int i = 0; i < 5; ++i) {
   // expected-error at +2{{OpenACC 'reduction' variable must have the same operator in all nested constructs (& vs +)}}
-  // expected-note at -3{{previous clause is here}}
+  // expected-note at -3{{previous 'reduction' clause is here}}
 #pragma acc parallel loop reduction(&:I)
     for(int i = 0; i < 5; ++i);
   }
 #pragma acc loop reduction(+:I)
   for(int i = 0; i < 5; ++i) {
   // expected-error at +2{{OpenACC 'reduction' variable must have the same operator in all nested constructs (& vs +)}}
-  // expected-note at -3{{previous clause is here}}
+  // expected-note at -3{{previous 'reduction' clause is here}}
 #pragma acc parallel loop reduction(&:I)
     for(int i = 0; i < 5; ++i);
   }
@@ -162,7 +162,7 @@ void uses(unsigned Parm) {
 #pragma acc parallel reduction(+:I)
   for(int i = 0; i < 5; ++i) {
   // expected-error at +2{{OpenACC 'reduction' variable must have the same operator in all nested constructs (& vs +)}}
-  // expected-note at -3{{previous clause is here}}
+  // expected-note at -3{{previous 'reduction' clause is here}}
 #pragma acc parallel loop reduction(&:I)
     for(int i = 0; i < 5; ++i);
   }

diff  --git a/clang/test/SemaOpenACC/combined-construct-self-clause.c b/clang/test/SemaOpenACC/combined-construct-self-clause.c
index 39ad85eaf2e99..d1c3c9d248bc0 100644
--- a/clang/test/SemaOpenACC/combined-construct-self-clause.c
+++ b/clang/test/SemaOpenACC/combined-construct-self-clause.c
@@ -33,22 +33,22 @@ void BoolExpr(int *I, float *F) {
 void WarnMaybeNotUsed(int val1, int val2) {
 
   // expected-warning at +2{{OpenACC construct 'self' has no effect when an 'if' clause evaluates to true}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'self' clause is here}}
 #pragma acc parallel loop self if(val1)
   for (unsigned i = 0; i < 5; ++i);
 
   // expected-warning at +2{{OpenACC construct 'self' has no effect when an 'if' clause evaluates to true}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'self' clause is here}}
 #pragma acc serial loop self(val1) if(val1)
   for (unsigned i = 0; i < 5; ++i);
 
   // expected-warning at +2{{OpenACC construct 'self' has no effect when an 'if' clause evaluates to true}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'if' clause is here}}
 #pragma acc kernels loop if(val1) self
   for (unsigned i = 0; i < 5; ++i);
 
   // expected-warning at +2{{OpenACC construct 'self' has no effect when an 'if' clause evaluates to true}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'if' clause is here}}
 #pragma acc parallel loop if(val1) self(val2)
   for (unsigned i = 0; i < 5; ++i);
 

diff  --git a/clang/test/SemaOpenACC/combined-construct-self-clause.cpp b/clang/test/SemaOpenACC/combined-construct-self-clause.cpp
index 73f5a55d77c31..716bc757e14ae 100644
--- a/clang/test/SemaOpenACC/combined-construct-self-clause.cpp
+++ b/clang/test/SemaOpenACC/combined-construct-self-clause.cpp
@@ -33,22 +33,22 @@ struct HasBool {
 template<typename T>
 void WarnMaybeNotUsed() {
   // expected-warning at +2{{OpenACC construct 'self' has no effect when an 'if' clause evaluates to true}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'self' clause is here}}
 #pragma acc parallel loop self if(T::B)
   for (unsigned i = 0; i < 5; ++i);
 
   // expected-warning at +2{{OpenACC construct 'self' has no effect when an 'if' clause evaluates to true}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'self' clause is here}}
 #pragma acc kernels loop self(T::B) if(T::B)
   for (unsigned i = 0; i < 5; ++i);
 
   // expected-warning at +2{{OpenACC construct 'self' has no effect when an 'if' clause evaluates to true}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'if' clause is here}}
 #pragma acc serial loop if(T::B) self
   for (unsigned i = 0; i < 5; ++i);
 
   // expected-warning at +2{{OpenACC construct 'self' has no effect when an 'if' clause evaluates to true}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'if' clause is here}}
 #pragma acc parallel loop if(T::B) self(T::B)
   for (unsigned i = 0; i < 5; ++i);
 
@@ -58,37 +58,37 @@ void WarnMaybeNotUsed() {
   // expected-error at +4{{no member named 'Invalid' in 'HasBool'}}
   // expected-note@#NOT_USED_INST{{in instantiation of function template specialization 'WarnMaybeNotUsed<HasBool>' requested here}}
   // expected-warning at +2{{OpenACC construct 'self' has no effect when an 'if' clause evaluates to true}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'self' clause is here}}
 #pragma acc parallel loop self if(T::Invalid)
   for (unsigned i = 0; i < 5; ++i);
 
   // expected-error at +3{{no member named 'Invalid' in 'HasBool'}}
   // expected-warning at +2{{OpenACC construct 'self' has no effect when an 'if' clause evaluates to true}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'self' clause is here}}
 #pragma acc serial loop self(T::Invalid) if(T::B)
   for (unsigned i = 0; i < 5; ++i);
 
   // expected-error at +3{{no member named 'Invalid' in 'HasBool'}}
   // expected-warning at +2{{OpenACC construct 'self' has no effect when an 'if' clause evaluates to true}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'self' clause is here}}
 #pragma acc kernels loop self(T::B) if(T::Invalid)
   for (unsigned i = 0; i < 5; ++i);
 
   // expected-error at +3{{no member named 'Invalid' in 'HasBool'}}
   // expected-warning at +2{{OpenACC construct 'self' has no effect when an 'if' clause evaluates to true}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'if' clause is here}}
 #pragma acc parallel loop if(T::Invalid) self
   for (unsigned i = 0; i < 5; ++i);
 
   // expected-error at +3{{no member named 'Invalid' in 'HasBool'}}
   // expected-warning at +2{{OpenACC construct 'self' has no effect when an 'if' clause evaluates to true}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'if' clause is here}}
 #pragma acc parallel loop if(T::Invalid) self(T::B)
   for (unsigned i = 0; i < 5; ++i);
 
   // expected-error at +3{{no member named 'Invalid' in 'HasBool'}}
   // expected-warning at +2{{OpenACC construct 'self' has no effect when an 'if' clause evaluates to true}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'if' clause is here}}
 #pragma acc parallel loop if(T::B) self(T::Invalid)
   for (unsigned i = 0; i < 5; ++i);
 }

diff  --git a/clang/test/SemaOpenACC/combined-construct-vector-clause.cpp b/clang/test/SemaOpenACC/combined-construct-vector-clause.cpp
index f96a36c1e395b..85a71486297a2 100644
--- a/clang/test/SemaOpenACC/combined-construct-vector-clause.cpp
+++ b/clang/test/SemaOpenACC/combined-construct-vector-clause.cpp
@@ -39,12 +39,12 @@ void TemplUses(T t) {
   for(int j = 0; j < 5; ++j);
 
   // expected-error at +2{{'vector_length' clause not allowed on a 'kernels loop' construct that has a 'vector' clause with an argument}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'vector' clause is here}}
 #pragma acc kernels loop vector(I) vector_length(t)
   for(int j = 0; j < 5; ++j);
 
   // expected-error at +2{{'length' argument to 'vector' clause not allowed on a 'kernels loop' construct that has a 'vector_length' clause}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'vector_length' clause is here}}
 #pragma acc kernels loop vector_length(t) vector(I)
   for(int j = 0; j < 5; ++j);
 
@@ -53,7 +53,7 @@ void TemplUses(T t) {
     // expected-error at +4{{loop with a 'vector' clause may not exist in the region of a 'vector' clause}}
     // expected-error at +3{{loop with a 'worker' clause may not exist in the region of a 'vector' clause}}
     // expected-error at +2{{loop with a 'gang' clause may not exist in the region of a 'vector' clause}}
-    // expected-note at -5 3{{previous clause is here}}
+    // expected-note at -5 3{{previous 'vector' clause is here}}
 #pragma acc loop vector worker, gang
     for(int j = 0; j < 5; ++j);
   }
@@ -125,12 +125,12 @@ void uses() {
   for(int j = 0; j < 5; ++j);
 
   // expected-error at +2{{'vector_length' clause not allowed on a 'kernels loop' construct that has a 'vector' clause with an argument}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'vector' clause is here}}
 #pragma acc kernels loop vector(I) vector_length(t)
   for(int j = 0; j < 5; ++j);
 
     // expected-error at +2{{'length' argument to 'vector' clause not allowed on a 'kernels loop' construct that has a 'vector_length' clause}}
-    // expected-note at +1{{previous clause is here}}
+    // expected-note at +1{{previous 'vector_length' clause is here}}
 #pragma acc kernels loop vector_length(t) vector(I)
   for(int j = 0; j < 5; ++j);
 
@@ -139,7 +139,7 @@ void uses() {
     // expected-error at +4{{loop with a 'vector' clause may not exist in the region of a 'vector' clause}}
     // expected-error at +3{{loop with a 'worker' clause may not exist in the region of a 'vector' clause}}
     // expected-error at +2{{loop with a 'gang' clause may not exist in the region of a 'vector' clause}}
-    // expected-note at -5 3{{previous clause is here}}
+    // expected-note at -5 3{{previous 'vector' clause is here}}
 #pragma acc loop vector worker, gang
     for(int j = 0; j < 5; ++j);
   }

diff  --git a/clang/test/SemaOpenACC/combined-construct-vector_length-clause.c b/clang/test/SemaOpenACC/combined-construct-vector_length-clause.c
index 72ab0126b1113..27a48178c687e 100644
--- a/clang/test/SemaOpenACC/combined-construct-vector_length-clause.c
+++ b/clang/test/SemaOpenACC/combined-construct-vector_length-clause.c
@@ -14,24 +14,24 @@ void Test() {
   for(int i = 5; i < 10;++i);
 
   // expected-error at +2{{OpenACC 'vector_length' clause cannot appear more than once on a 'kernels loop' directive}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'vector_length' clause is here}}
 #pragma acc kernels loop vector_length(1) vector_length(2)
   for(int i = 5; i < 10;++i);
 
   // expected-error at +2{{OpenACC 'vector_length' clause cannot appear more than once on a 'parallel loop' directive}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'vector_length' clause is here}}
 #pragma acc parallel loop vector_length(1) vector_length(2)
   for(int i = 5; i < 10;++i);
 
   // expected-error at +3{{OpenACC 'vector_length' clause cannot appear more than once in a 'device_type' region on a 'kernels loop' directive}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'vector_length' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc kernels loop vector_length(1) device_type(*) vector_length(1) vector_length(2)
   for(int i = 5; i < 10;++i);
 
   // expected-error at +3{{OpenACC 'vector_length' clause cannot appear more than once in a 'device_type' region on a 'parallel loop' directive}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'vector_length' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc parallel loop device_type(*) vector_length(1) vector_length(2)
   for(int i = 5; i < 10;++i);
 

diff  --git a/clang/test/SemaOpenACC/combined-construct-worker-clause.cpp b/clang/test/SemaOpenACC/combined-construct-worker-clause.cpp
index 1351f9ea0c69c..da0769d1ca393 100644
--- a/clang/test/SemaOpenACC/combined-construct-worker-clause.cpp
+++ b/clang/test/SemaOpenACC/combined-construct-worker-clause.cpp
@@ -40,12 +40,12 @@ void TemplUses() {
   for(int i = 0; i < 5; ++i);
 
   // expected-error at +2{{'num' argument to 'worker' clause not allowed on a 'kernels loop' construct that has a 'num_workers' clause}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'num_workers' clause is here}}
 #pragma acc kernels loop num_workers(1) worker(num:I)
   for(int i = 0; i < 5; ++i);
 
   // expected-error at +2{{'num_workers' clause not allowed on a 'kernels loop' construct that has a 'worker' clause with an argument}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'worker' clause is here}}
 #pragma acc kernels loop worker(num:I) num_workers(1)
   for(int i = 0; i < 5; ++i);
 }
@@ -91,12 +91,12 @@ void NormalUses() {
   for(int i = 0; i < 5; ++i);
 
   // expected-error at +2{{'num' argument to 'worker' clause not allowed on a 'kernels loop' construct that has a 'num_workers' clause}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'num_workers' clause is here}}
 #pragma acc kernels loop num_workers(1) worker(num:I)
   for(int i = 0; i < 5; ++i);
 
   // expected-error at +2{{'num_workers' clause not allowed on a 'kernels loop' construct that has a 'worker' clause with an argument}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'worker' clause is here}}
 #pragma acc kernels loop worker(num:I) num_workers(1)
   for(int i = 0; i < 5; ++i);
 
@@ -115,7 +115,7 @@ void NormalUses() {
 #pragma acc kernels loop num_workers(1)
   for(int i = 0; i < 5; ++i) {
   // expected-error at +2{{'num' argument to 'worker' clause not allowed on a 'loop' construct associated with a 'kernels loop' construct that has a 'num_workers' clause}}
-  // expected-note at -3{{previous clause is here}}
+  // expected-note at -3{{previous 'num_workers' clause is here}}
 #pragma acc loop worker(num:1)
   for(int i = 0; i < 5; ++i);
   }
@@ -123,27 +123,27 @@ void NormalUses() {
 #pragma acc parallel loop worker
   for(int i = 0; i < 5; ++i) {
     // expected-error at +4{{loop with a 'gang' clause may not exist in the region of a 'worker' clause}}
-    // expected-note at -3{{previous clause is here}}
+    // expected-note at -3{{previous 'worker' clause is here}}
     // expected-error at +2{{loop with a 'worker' clause may not exist in the region of a 'worker' clause}}
-    // expected-note at -5{{previous clause is here}}
+    // expected-note at -5{{previous 'worker' clause is here}}
 #pragma acc loop gang, worker, vector
   for(int i = 0; i < 5; ++i);
   }
 #pragma acc kernels loop worker
   for(int i = 0; i < 5; ++i) {
     // expected-error at +4{{loop with a 'gang' clause may not exist in the region of a 'worker' clause}}
-    // expected-note at -3{{previous clause is here}}
+    // expected-note at -3{{previous 'worker' clause is here}}
     // expected-error at +2{{loop with a 'worker' clause may not exist in the region of a 'worker' clause}}
-    // expected-note at -5{{previous clause is here}}
+    // expected-note at -5{{previous 'worker' clause is here}}
 #pragma acc loop gang, worker, vector
   for(int i = 0; i < 5; ++i);
   }
 #pragma acc serial loop worker
   for(int i = 0; i < 5; ++i) {
     // expected-error at +4{{loop with a 'gang' clause may not exist in the region of a 'worker' clause}}
-    // expected-note at -3{{previous clause is here}}
+    // expected-note at -3{{previous 'worker' clause is here}}
     // expected-error at +2{{loop with a 'worker' clause may not exist in the region of a 'worker' clause}}
-    // expected-note at -5{{previous clause is here}}
+    // expected-note at -5{{previous 'worker' clause is here}}
 #pragma acc loop gang, worker, vector
   for(int i = 0; i < 5; ++i);
   }

diff  --git a/clang/test/SemaOpenACC/compute-construct-async-clause.c b/clang/test/SemaOpenACC/compute-construct-async-clause.c
index 4ca963713254c..5c0fba27690ca 100644
--- a/clang/test/SemaOpenACC/compute-construct-async-clause.c
+++ b/clang/test/SemaOpenACC/compute-construct-async-clause.c
@@ -21,44 +21,44 @@ void Test() {
   while(1);
 
   // expected-error at +2{{OpenACC 'async' clause cannot appear more than once on a 'kernels' directive}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'async' clause is here}}
 #pragma acc kernels async async
   while(1);
 
   // expected-error at +2{{OpenACC 'async' clause cannot appear more than once on a 'kernels' directive}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'async' clause is here}}
 #pragma acc kernels async(1) async(2)
   while(1);
 
   // expected-error at +2{{OpenACC 'async' clause cannot appear more than once on a 'parallel' directive}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'async' clause is here}}
 #pragma acc parallel async(1) async(2)
   while(1);
 
   // expected-error at +2{{OpenACC 'async' clause cannot appear more than once on a 'serial' directive}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'async' clause is here}}
 #pragma acc serial async(1) async(2)
   while(1);
 
   // expected-error at +3{{OpenACC 'async' clause cannot appear more than once in a 'device_type' region on a 'kernels' directive}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'async' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc kernels async(1) device_type(*) async(1) async(2)
   while(1);
   // expected-error at +3{{OpenACC 'async' clause cannot appear more than once in a 'device_type' region on a 'parallel' directive}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'async' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc parallel async device_type(*) async async
   while(1);
   // expected-error at +3{{OpenACC 'async' clause cannot appear more than once in a 'device_type' region on a 'serial' directive}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'async' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc serial async(1) device_type(*) async async(2)
   while(1);
 
   // expected-error at +3{{OpenACC 'async' clause cannot appear more than once in a 'device_type' region on a 'parallel' directive}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'async' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc parallel device_type(*) async async
   while(1);
 

diff  --git a/clang/test/SemaOpenACC/compute-construct-default-clause.c b/clang/test/SemaOpenACC/compute-construct-default-clause.c
index 86a758779fdf6..7a39ea067102d 100644
--- a/clang/test/SemaOpenACC/compute-construct-default-clause.c
+++ b/clang/test/SemaOpenACC/compute-construct-default-clause.c
@@ -5,19 +5,19 @@ void SingleOnly() {
   while(0);
 
   // expected-error at +2{{OpenACC 'default' clause cannot appear more than once on a 'serial' directive}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'default' clause is here}}
   #pragma acc serial default(present) self default(none)
   while(0);
 
   int i;
 
   // expected-error at +2{{OpenACC 'default' clause cannot appear more than once on a 'kernels' directive}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'default' clause is here}}
   #pragma acc kernels self default(present) present(i) default(none) copy(i)
   while(0);
 
   // expected-error at +2{{OpenACC 'default' clause cannot appear more than once on a 'parallel' directive}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'default' clause is here}}
   #pragma acc parallel self default(present) private(i) default(none) copy(i)
   for(int i = 0; i < 5; ++i);
 

diff  --git a/clang/test/SemaOpenACC/compute-construct-default-clause.cpp b/clang/test/SemaOpenACC/compute-construct-default-clause.cpp
index 8a4a79d0eb2dc..e0f3f3fea2214 100644
--- a/clang/test/SemaOpenACC/compute-construct-default-clause.cpp
+++ b/clang/test/SemaOpenACC/compute-construct-default-clause.cpp
@@ -8,17 +8,17 @@ void SingleOnly() {
   int i;
 
   // expected-error at +2{{OpenACC 'default' clause cannot appear more than once on a 'parallel' directive}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'default' clause is here}}
   #pragma acc parallel default(present) async default(none)
   while(false);
 
   // expected-error at +2{{OpenACC 'default' clause cannot appear more than once on a 'serial' directive}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'default' clause is here}}
   #pragma acc serial async default(present) copy(i) default(none) self
   while(false);
 
   // expected-error at +2{{OpenACC 'default' clause cannot appear more than once on a 'kernels' directive}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'default' clause is here}}
   #pragma acc kernels async default(present) copy(i) default(none) self
   while(false);
 

diff  --git a/clang/test/SemaOpenACC/compute-construct-device_type-clause.c b/clang/test/SemaOpenACC/compute-construct-device_type-clause.c
index 2ff6369383714..3dc20ee06c434 100644
--- a/clang/test/SemaOpenACC/compute-construct-device_type-clause.c
+++ b/clang/test/SemaOpenACC/compute-construct-device_type-clause.c
@@ -66,37 +66,37 @@ void uses() {
 #pragma acc kernels device_type(*) nohost
   while(1);
   // expected-error at +2{{OpenACC clause 'default' may not follow a 'device_type' clause in a 'kernels' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc kernels device_type(*) default(none)
   while(1);
   // expected-error at +2{{OpenACC clause 'if' may not follow a 'device_type' clause in a 'kernels' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc kernels device_type(*) if(1)
   while(1);
   // expected-error at +2{{OpenACC clause 'self' may not follow a 'device_type' clause in a 'kernels' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc kernels device_type(*) self
   while(1);
 
   int Var;
   int *VarPtr;
   // expected-error at +2{{OpenACC clause 'copy' may not follow a 'device_type' clause in a 'kernels' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc kernels device_type(*) copy(Var)
   while(1);
   // expected-error at +2{{OpenACC clause 'pcopy' may not follow a 'device_type' clause in a 'kernels' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc kernels device_type(*) pcopy(Var)
   while(1);
   // expected-error at +2{{OpenACC clause 'present_or_copy' may not follow a 'device_type' clause in a 'kernels' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc kernels device_type(*) present_or_copy(Var)
   while(1);
   // expected-error at +1{{OpenACC 'use_device' clause is not valid on 'kernels' directive}}
 #pragma acc kernels device_type(*) use_device(Var)
   while(1);
   // expected-error at +2{{OpenACC clause 'attach' may not follow a 'device_type' clause in a 'kernels' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc kernels device_type(*) attach(Var)
   while(1);
   // expected-error at +1{{OpenACC 'delete' clause is not valid on 'kernels' directive}}
@@ -109,14 +109,14 @@ void uses() {
 #pragma acc kernels device_type(*) device(VarPtr)
   while(1);
   // expected-error at +2{{OpenACC clause 'deviceptr' may not follow a 'device_type' clause in a 'kernels' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc kernels device_type(*) deviceptr(VarPtr)
   while(1);
   // expected-error at +1{{OpenACC 'device_resident' clause is not valid on 'kernels' directive}}
 #pragma acc kernels device_type(*)  device_resident(VarPtr)
   while(1);
   // expected-error at +2{{OpenACC clause 'firstprivate' may not follow a 'device_type' clause in a 'parallel' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc parallel device_type(*) firstprivate(Var)
   while(1);
   // expected-error at +1{{OpenACC 'host' clause is not valid on 'kernels' directive}}
@@ -126,55 +126,55 @@ void uses() {
 #pragma acc kernels device_type(*) link(Var)
   while(1);
   // expected-error at +2{{OpenACC clause 'no_create' may not follow a 'device_type' clause in a 'kernels' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc kernels device_type(*) no_create(Var)
   while(1);
   // expected-error at +2{{OpenACC clause 'present' may not follow a 'device_type' clause in a 'kernels' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc kernels device_type(*) present(Var)
   while(1);
   // expected-error at +2{{OpenACC clause 'private' may not follow a 'device_type' clause in a 'parallel' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc parallel device_type(*) private(Var)
   while(1);
   // expected-error at +2{{OpenACC clause 'copyout' may not follow a 'device_type' clause in a 'kernels' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc kernels device_type(*) copyout(Var)
   while(1);
   // expected-error at +2{{OpenACC clause 'pcopyout' may not follow a 'device_type' clause in a 'kernels' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc kernels device_type(*) pcopyout(Var)
   while(1);
   // expected-error at +2{{OpenACC clause 'present_or_copyout' may not follow a 'device_type' clause in a 'kernels' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc kernels device_type(*) present_or_copyout(Var)
   while(1);
   // expected-error at +2{{OpenACC clause 'copyin' may not follow a 'device_type' clause in a 'kernels' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc kernels device_type(*) copyin(Var)
   while(1);
   // expected-error at +2{{OpenACC clause 'pcopyin' may not follow a 'device_type' clause in a 'kernels' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc kernels device_type(*) pcopyin(Var)
   while(1);
   // expected-error at +2{{OpenACC clause 'present_or_copyin' may not follow a 'device_type' clause in a 'kernels' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc kernels device_type(*) present_or_copyin(Var)
   while(1);
   // expected-error at +2{{OpenACC clause 'create' may not follow a 'device_type' clause in a 'kernels' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc kernels device_type(*) create(Var)
   while(1);
   // expected-error at +2{{OpenACC clause 'pcreate' may not follow a 'device_type' clause in a 'kernels' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc kernels device_type(*) pcreate(Var)
   while(1);
   // expected-error at +2{{OpenACC clause 'present_or_create' may not follow a 'device_type' clause in a 'kernels' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc kernels device_type(*) present_or_create(Var)
   while(1);
   // expected-error at +2{{OpenACC clause 'reduction' may not follow a 'device_type' clause in a 'serial' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc serial device_type(*) reduction(+:Var)
   while(1);
   // expected-error at +1{{OpenACC 'collapse' clause is not valid on 'kernels' directive}}

diff  --git a/clang/test/SemaOpenACC/compute-construct-num_gangs-clause.c b/clang/test/SemaOpenACC/compute-construct-num_gangs-clause.c
index 904928ce7248b..37c43dc8c6e90 100644
--- a/clang/test/SemaOpenACC/compute-construct-num_gangs-clause.c
+++ b/clang/test/SemaOpenACC/compute-construct-num_gangs-clause.c
@@ -13,24 +13,24 @@ void Test() {
   while(1);
 
   // expected-error at +2{{OpenACC 'num_gangs' clause cannot appear more than once on a 'kernels' directive}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'num_gangs' clause is here}}
 #pragma acc kernels num_gangs(1) num_gangs(2)
   while(1);
 
   // expected-error at +2{{OpenACC 'num_gangs' clause cannot appear more than once on a 'parallel' directive}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'num_gangs' clause is here}}
 #pragma acc parallel num_gangs(1) num_gangs(2)
   while(1);
 
   // expected-error at +3{{OpenACC 'num_gangs' clause cannot appear more than once in a 'device_type' region on a 'kernels' directive}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'num_gangs' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc kernels num_gangs(1) device_type(*) num_gangs(1) num_gangs(2)
   while(1);
 
   // expected-error at +3{{OpenACC 'num_gangs' clause cannot appear more than once in a 'device_type' region on a 'parallel' directive}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'num_gangs' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc parallel device_type(*) num_gangs(1) num_gangs(2)
   while(1);
 

diff  --git a/clang/test/SemaOpenACC/compute-construct-num_workers-clause.c b/clang/test/SemaOpenACC/compute-construct-num_workers-clause.c
index cea0fdc85d9b5..cbd4586be2726 100644
--- a/clang/test/SemaOpenACC/compute-construct-num_workers-clause.c
+++ b/clang/test/SemaOpenACC/compute-construct-num_workers-clause.c
@@ -9,24 +9,24 @@ void Test() {
   while(1);
 
   // expected-error at +2{{OpenACC 'num_workers' clause cannot appear more than once on a 'kernels' directive}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'num_workers' clause is here}}
 #pragma acc kernels num_workers(1) num_workers(2)
   while(1);
 
   // expected-error at +2{{OpenACC 'num_workers' clause cannot appear more than once on a 'parallel' directive}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'num_workers' clause is here}}
 #pragma acc parallel num_workers(1) num_workers(2)
   while(1);
 
   // expected-error at +3{{OpenACC 'num_workers' clause cannot appear more than once in a 'device_type' region on a 'kernels' directive}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'num_workers' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc kernels num_workers(1) device_type(*) num_workers(1) num_workers(2)
   while(1);
 
   // expected-error at +3{{OpenACC 'num_workers' clause cannot appear more than once in a 'device_type' region on a 'parallel' directive}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'num_workers' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc parallel device_type(*) num_workers(1) num_workers(2)
   while(1);
 

diff  --git a/clang/test/SemaOpenACC/compute-construct-reduction-clause.c b/clang/test/SemaOpenACC/compute-construct-reduction-clause.c
index 4d426cf189fca..6a77f07720d5d 100644
--- a/clang/test/SemaOpenACC/compute-construct-reduction-clause.c
+++ b/clang/test/SemaOpenACC/compute-construct-reduction-clause.c
@@ -42,12 +42,12 @@ void uses(unsigned Parm) {
   while (1);
 
   // expected-error at +2{{OpenACC 'num_gangs' clause with more than 1 argument may not appear on a 'parallel' construct with a 'reduction' clause}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'reduction' clause is here}}
 #pragma acc parallel reduction(+:Parm) num_gangs(Parm, IVar)
   while (1);
 
   // expected-error at +2{{OpenACC 'reduction' clause may not appear on a 'parallel' construct with a 'num_gangs' clause with more than 1 argument}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'num_gangs' clause is here}}
 #pragma acc parallel num_gangs(Parm, IVar) reduction(+:Var)
   while (1);
 

diff  --git a/clang/test/SemaOpenACC/compute-construct-reduction-clause.cpp b/clang/test/SemaOpenACC/compute-construct-reduction-clause.cpp
index 7372f683e2eb3..3e972b0f36846 100644
--- a/clang/test/SemaOpenACC/compute-construct-reduction-clause.cpp
+++ b/clang/test/SemaOpenACC/compute-construct-reduction-clause.cpp
@@ -42,12 +42,12 @@ void uses(unsigned Parm) {
   while (1);
 
   // expected-error at +2{{OpenACC 'num_gangs' clause with more than 1 argument may not appear on a 'parallel' construct with a 'reduction' clause}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'reduction' clause is here}}
 #pragma acc parallel reduction(+:Parm) num_gangs(Parm, IVar)
   while (1);
 
   // expected-error at +2{{OpenACC 'reduction' clause may not appear on a 'parallel' construct with a 'num_gangs' clause with more than 1 argument}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'num_gangs' clause is here}}
 #pragma acc parallel num_gangs(Parm, IVar) reduction(+:Var)
   while (1);
 
@@ -117,12 +117,12 @@ void TemplUses(T Parm, U CoS, V ChC) {
   while (1);
 
   // expected-error at +2{{OpenACC 'num_gangs' clause with more than 1 argument may not appear on a 'parallel' construct with a 'reduction' clause}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'reduction' clause is here}}
 #pragma acc parallel reduction(+:Parm) num_gangs(Parm, Var)
   while (1);
 
   // expected-error at +2{{OpenACC 'reduction' clause may not appear on a 'parallel' construct with a 'num_gangs' clause with more than 1 argument}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'num_gangs' clause is here}}
 #pragma acc parallel num_gangs(Parm, Var) reduction(+:Var)
   while (1);
 

diff  --git a/clang/test/SemaOpenACC/compute-construct-self-clause.c b/clang/test/SemaOpenACC/compute-construct-self-clause.c
index 1d1cbaabbdc3c..ce850256d6d7b 100644
--- a/clang/test/SemaOpenACC/compute-construct-self-clause.c
+++ b/clang/test/SemaOpenACC/compute-construct-self-clause.c
@@ -33,22 +33,22 @@ void BoolExpr(int *I, float *F) {
 void WarnMaybeNotUsed(int val1, int val2) {
 
   // expected-warning at +2{{OpenACC construct 'self' has no effect when an 'if' clause evaluates to true}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'self' clause is here}}
 #pragma acc parallel self if(val1)
   while(0);
 
   // expected-warning at +2{{OpenACC construct 'self' has no effect when an 'if' clause evaluates to true}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'self' clause is here}}
 #pragma acc parallel self(val1) if(val1)
   while(0);
 
   // expected-warning at +2{{OpenACC construct 'self' has no effect when an 'if' clause evaluates to true}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'if' clause is here}}
 #pragma acc parallel if(val1) self
   while(0);
 
   // expected-warning at +2{{OpenACC construct 'self' has no effect when an 'if' clause evaluates to true}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'if' clause is here}}
 #pragma acc parallel if(val1) self(val2)
   while(0);
 

diff  --git a/clang/test/SemaOpenACC/compute-construct-self-clause.cpp b/clang/test/SemaOpenACC/compute-construct-self-clause.cpp
index 60edbdc2b1191..e48f5bf933777 100644
--- a/clang/test/SemaOpenACC/compute-construct-self-clause.cpp
+++ b/clang/test/SemaOpenACC/compute-construct-self-clause.cpp
@@ -33,22 +33,22 @@ struct HasBool {
 template<typename T>
 void WarnMaybeNotUsed() {
   // expected-warning at +2{{OpenACC construct 'self' has no effect when an 'if' clause evaluates to true}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'self' clause is here}}
 #pragma acc parallel self if(T::B)
   while(0);
 
   // expected-warning at +2{{OpenACC construct 'self' has no effect when an 'if' clause evaluates to true}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'self' clause is here}}
 #pragma acc parallel self(T::B) if(T::B)
   while(0);
 
   // expected-warning at +2{{OpenACC construct 'self' has no effect when an 'if' clause evaluates to true}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'if' clause is here}}
 #pragma acc parallel if(T::B) self
   while(0);
 
   // expected-warning at +2{{OpenACC construct 'self' has no effect when an 'if' clause evaluates to true}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'if' clause is here}}
 #pragma acc parallel if(T::B) self(T::B)
   while(0);
 
@@ -58,37 +58,37 @@ void WarnMaybeNotUsed() {
   // expected-error at +4{{no member named 'Invalid' in 'HasBool'}}
   // expected-note@#NOT_USED_INST{{in instantiation of function template specialization 'WarnMaybeNotUsed<HasBool>' requested here}}
   // expected-warning at +2{{OpenACC construct 'self' has no effect when an 'if' clause evaluates to true}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'self' clause is here}}
 #pragma acc parallel self if(T::Invalid)
   while(0);
 
   // expected-error at +3{{no member named 'Invalid' in 'HasBool'}}
   // expected-warning at +2{{OpenACC construct 'self' has no effect when an 'if' clause evaluates to true}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'self' clause is here}}
 #pragma acc parallel self(T::Invalid) if(T::B)
   while(0);
 
   // expected-error at +3{{no member named 'Invalid' in 'HasBool'}}
   // expected-warning at +2{{OpenACC construct 'self' has no effect when an 'if' clause evaluates to true}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'self' clause is here}}
 #pragma acc parallel self(T::B) if(T::Invalid)
   while(0);
 
   // expected-error at +3{{no member named 'Invalid' in 'HasBool'}}
   // expected-warning at +2{{OpenACC construct 'self' has no effect when an 'if' clause evaluates to true}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'if' clause is here}}
 #pragma acc parallel if(T::Invalid) self
   while(0);
 
   // expected-error at +3{{no member named 'Invalid' in 'HasBool'}}
   // expected-warning at +2{{OpenACC construct 'self' has no effect when an 'if' clause evaluates to true}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'if' clause is here}}
 #pragma acc parallel if(T::Invalid) self(T::B)
   while(0);
 
   // expected-error at +3{{no member named 'Invalid' in 'HasBool'}}
   // expected-warning at +2{{OpenACC construct 'self' has no effect when an 'if' clause evaluates to true}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'if' clause is here}}
 #pragma acc parallel if(T::B) self(T::Invalid)
   while(0);
 }

diff  --git a/clang/test/SemaOpenACC/compute-construct-vector_length-clause.c b/clang/test/SemaOpenACC/compute-construct-vector_length-clause.c
index 5b678593fd3cf..4d16176ba58a1 100644
--- a/clang/test/SemaOpenACC/compute-construct-vector_length-clause.c
+++ b/clang/test/SemaOpenACC/compute-construct-vector_length-clause.c
@@ -9,24 +9,24 @@ void Test() {
   while(1);
 
   // expected-error at +2{{OpenACC 'vector_length' clause cannot appear more than once on a 'kernels' directive}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'vector_length' clause is here}}
 #pragma acc kernels vector_length(1) vector_length(2)
   while(1);
 
   // expected-error at +2{{OpenACC 'vector_length' clause cannot appear more than once on a 'parallel' directive}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'vector_length' clause is here}}
 #pragma acc parallel vector_length(1) vector_length(2)
   while(1);
 
   // expected-error at +3{{OpenACC 'vector_length' clause cannot appear more than once in a 'device_type' region on a 'kernels' directive}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'vector_length' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc kernels vector_length(1) device_type(*) vector_length(1) vector_length(2)
   while(1);
 
   // expected-error at +3{{OpenACC 'vector_length' clause cannot appear more than once in a 'device_type' region on a 'parallel' directive}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'vector_length' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc parallel device_type(*) vector_length(1) vector_length(2)
   while(1);
 

diff  --git a/clang/test/SemaOpenACC/data-construct-async-clause.c b/clang/test/SemaOpenACC/data-construct-async-clause.c
index 6cb34b0fcebda..14ec74c992a51 100644
--- a/clang/test/SemaOpenACC/data-construct-async-clause.c
+++ b/clang/test/SemaOpenACC/data-construct-async-clause.c
@@ -25,7 +25,7 @@ void Test() {
   ;
 
   // expected-error at +2{{OpenACC 'async' clause cannot appear more than once on a 'data' directive}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'async' clause is here}}
 #pragma acc data copyin(I) async(I) async(I)
   ;
   // expected-error at +2{{expected ')'}}
@@ -33,39 +33,39 @@ void Test() {
 #pragma acc enter data copyin(I) async(I, I)
   //
   // expected-error at +2{{OpenACC 'async' clause cannot appear more than once on a 'data' directive}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'async' clause is here}}
 #pragma acc data default(none) async async
   while(1);
 
   // expected-error at +2{{OpenACC 'async' clause cannot appear more than once on a 'data' directive}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'async' clause is here}}
 #pragma acc data default(none) async(1) async(2)
   while(1);
 
   // expected-error at +2{{OpenACC 'async' clause cannot appear more than once on a 'data' directive}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'async' clause is here}}
 #pragma acc data default(none) async(1) async(2)
   while(1);
 
   // expected-error at +3{{OpenACC 'async' clause cannot appear more than once in a 'device_type' region on a 'data' directive}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'async' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc data default(none) async(1) device_type(*) async(1) async(2)
   while(1);
   // expected-error at +3{{OpenACC 'async' clause cannot appear more than once in a 'device_type' region on a 'data' directive}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'async' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc data default(none) async device_type(*) async async
   while(1);
   // expected-error at +3{{OpenACC 'async' clause cannot appear more than once in a 'device_type' region on a 'data' directive}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'async' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc data default(none) async(1) device_type(*) async async(2)
   while(1);
 
   // expected-error at +3{{OpenACC 'async' clause cannot appear more than once in a 'device_type' region on a 'data' directive}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'async' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc data default(none) device_type(*) async async
   while(1);
 }

diff  --git a/clang/test/SemaOpenACC/data-construct-default-clause.c b/clang/test/SemaOpenACC/data-construct-default-clause.c
index 9e8ee529e9b8a..b9ed7c5e0d6e1 100644
--- a/clang/test/SemaOpenACC/data-construct-default-clause.c
+++ b/clang/test/SemaOpenACC/data-construct-default-clause.c
@@ -10,7 +10,7 @@ void use() {
 #pragma acc data default(none)
   ;
   // expected-error at +2{{OpenACC 'default' clause cannot appear more than once on a 'data' directive}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'default' clause is here}}
 #pragma acc data default(none) default(present)
   ;
   // expected-error at +2{{OpenACC 'enter data' construct must have at least one 'attach', 'copyin', or 'create' clause}}

diff  --git a/clang/test/SemaOpenACC/data-construct-device_type-clause.c b/clang/test/SemaOpenACC/data-construct-device_type-clause.c
index a8234224540ba..4dfcf930cf9d1 100644
--- a/clang/test/SemaOpenACC/data-construct-device_type-clause.c
+++ b/clang/test/SemaOpenACC/data-construct-device_type-clause.c
@@ -12,44 +12,44 @@ void uses() {
   ;
 
   // expected-error at +2{{OpenACC clause 'if' may not follow a 'device_type' clause in a 'data' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc data default(none) device_type(radeon) if(1)
   ;
   // expected-error at +2{{OpenACC clause 'copy' may not follow a 'device_type' clause in a 'data' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc data default(none) device_type(radeon) copy(Var)
   ;
   // expected-error at +2{{OpenACC clause 'copyin' may not follow a 'device_type' clause in a 'data' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc data default(none) device_type(radeon) copyin(Var)
   ;
   // expected-error at +2{{OpenACC clause 'copyout' may not follow a 'device_type' clause in a 'data' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc data default(none) device_type(radeon) copyout(Var)
   ;
   // expected-error at +2{{OpenACC clause 'create' may not follow a 'device_type' clause in a 'data' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc data default(none) device_type(radeon) create(Var)
   ;
   // expected-error at +2{{OpenACC clause 'no_create' may not follow a 'device_type' clause in a 'data' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc data default(none) device_type(radeon) no_create(Var)
   ;
   // expected-error at +2{{OpenACC clause 'present' may not follow a 'device_type' clause in a 'data' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc data default(none) device_type(radeon) present(Var)
   ;
   // expected-error at +2{{OpenACC clause 'deviceptr' may not follow a 'device_type' clause in a 'data' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc data default(none) device_type(radeon) deviceptr(Var)
   ;
   // expected-error at +2{{OpenACC clause 'attach' may not follow a 'device_type' clause in a 'data' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc data default(none) device_type(radeon) attach(Var)
   ;
   // expected-error at +3{{OpenACC 'data' construct must have at least one 'attach', 'copy', 'copyin', 'copyout', 'create', 'default', 'deviceptr', 'no_create', or 'present' clause}}
   // expected-error at +2{{OpenACC clause 'default' may not follow a 'device_type' clause in a 'data' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc data device_type(radeon) default(none)
   ;
 }

diff  --git a/clang/test/SemaOpenACC/data-construct-if-clause.c b/clang/test/SemaOpenACC/data-construct-if-clause.c
index f22452d2c34a4..cf44b36830eb1 100644
--- a/clang/test/SemaOpenACC/data-construct-if-clause.c
+++ b/clang/test/SemaOpenACC/data-construct-if-clause.c
@@ -5,25 +5,25 @@ void Foo() {
 #pragma acc data default(present) if(1)
   ;
   // expected-error at +2{{OpenACC 'if' clause cannot appear more than once on a 'data' directive}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'if' clause is here}}
 #pragma acc data default(present) if(1) if (2)
   ;
 
 #pragma acc enter data copyin(Var) if(1)
 
   // expected-error at +2{{OpenACC 'if' clause cannot appear more than once on a 'enter data' directive}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'if' clause is here}}
 #pragma acc enter data copyin(Var) if(1) if (2)
 
 #pragma acc exit data copyout(Var) if(1)
   // expected-error at +2{{OpenACC 'if' clause cannot appear more than once on a 'exit data' directive}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'if' clause is here}}
 #pragma acc exit data copyout(Var) if(1) if (2)
 
 #pragma acc host_data use_device(Var) if(1)
   ;
   // expected-error at +2{{OpenACC 'if' clause cannot appear more than once on a 'host_data' directive}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'if' clause is here}}
 #pragma acc host_data use_device(Var) if(1) if (2)
   ;
 }

diff  --git a/clang/test/SemaOpenACC/data-construct.cpp b/clang/test/SemaOpenACC/data-construct.cpp
index ffb037d439c8e..394ebb0e52b56 100644
--- a/clang/test/SemaOpenACC/data-construct.cpp
+++ b/clang/test/SemaOpenACC/data-construct.cpp
@@ -110,43 +110,43 @@ void AtLeastOneOf() {
 void DataRules() {
   int Var;
   // expected-error at +2{{OpenACC clause 'copy' may not follow a 'device_type' clause in a 'data' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc data default(none) device_type(*) copy(Var)
   ;
   // expected-error at +2{{OpenACC clause 'copyin' may not follow a 'device_type' clause in a 'data' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc data default(none) device_type(*) copyin(Var)
   ;
   // expected-error at +2{{OpenACC clause 'copyout' may not follow a 'device_type' clause in a 'data' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc data default(none) device_type(*) copyout(Var)
   ;
   // expected-error at +2{{OpenACC clause 'create' may not follow a 'device_type' clause in a 'data' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc data default(none) device_type(*) create(Var)
   ;
   // expected-error at +2{{OpenACC clause 'no_create' may not follow a 'device_type' clause in a 'data' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc data default(none) device_type(*) no_create(Var)
   ;
   // expected-error at +2{{OpenACC clause 'present' may not follow a 'device_type' clause in a 'data' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc data default(none) device_type(*) present(Var)
   ;
   // expected-error at +2{{OpenACC clause 'deviceptr' may not follow a 'device_type' clause in a 'data' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc data default(none) device_type(*) deviceptr(Var)
   ;
   // expected-error at +2{{OpenACC clause 'attach' may not follow a 'device_type' clause in a 'data' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc data default(none) device_type(*) attach(Var)
   ;
   // expected-error at +2{{OpenACC clause 'default' may not follow a 'device_type' clause in a 'data' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc data default(none) device_type(*) default(none)
   ;
   // expected-error at +2{{OpenACC clause 'if' may not follow a 'device_type' clause in a 'data' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc data default(none) device_type(*) if(Var)
   ;
 #pragma acc data default(none) device_type(*) async
@@ -174,7 +174,7 @@ void HostDataRules() {
   int Var, Var2;
   // expected-error at +3{{OpenACC 'host_data' construct must have at least one 'use_device' clause}}
   // expected-error at +2{{OpenACC 'if' clause cannot appear more than once on a 'host_data' directive}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'if' clause is here}}
 #pragma acc host_data if(Var) if (Var2)
   ;
 

diff  --git a/clang/test/SemaOpenACC/init-construct.cpp b/clang/test/SemaOpenACC/init-construct.cpp
index ad901b3aa211e..abc7f741e3f47 100644
--- a/clang/test/SemaOpenACC/init-construct.cpp
+++ b/clang/test/SemaOpenACC/init-construct.cpp
@@ -43,11 +43,11 @@ void TestInst() {
 #pragma acc init if (T::value < T{})
 #pragma acc init device_type(radeon) device_num(getI()) if (getI() < getS())
   // expected-error at +2{{OpenACC 'device_num' clause cannot appear more than once on a 'init' directive}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'device_num' clause is here}}
 #pragma acc init device_type(multicore) device_type(host) device_num(t) if (t < T::value) device_num(getI()) 
 
   // expected-error at +2{{OpenACC 'if' clause cannot appear more than once on a 'init' directive}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'if' clause is here}}
 #pragma acc init if(t < T::value) if (getI() < getS())
 
   // expected-error at +1{{value of type 'const NotConvertible' is not contextually convertible to 'bool'}}

diff  --git a/clang/test/SemaOpenACC/loop-construct-auto_seq_independent-clauses.c b/clang/test/SemaOpenACC/loop-construct-auto_seq_independent-clauses.c
index 762873f13d96a..381b3ff3d8227 100644
--- a/clang/test/SemaOpenACC/loop-construct-auto_seq_independent-clauses.c
+++ b/clang/test/SemaOpenACC/loop-construct-auto_seq_independent-clauses.c
@@ -9,40 +9,40 @@ void uses() {
   for(unsigned i = 0; i < 5; ++i);
 
   // expected-error at +2{{OpenACC clause 'seq' may not appear on the same construct as a 'auto' clause on a 'loop' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'auto' clause is here}}
 #pragma acc loop auto seq
   for(unsigned i = 0; i < 5; ++i);
   // expected-error at +2{{OpenACC clause 'independent' may not appear on the same construct as a 'auto' clause on a 'loop' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'auto' clause is here}}
 #pragma acc loop auto independent
   for(unsigned i = 0; i < 5; ++i);
   // expected-error at +2{{OpenACC clause 'auto' may not appear on the same construct as a 'seq' clause on a 'loop' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'seq' clause is here}}
 #pragma acc loop seq auto
   for(unsigned i = 0; i < 5; ++i);
   // expected-error at +2{{OpenACC clause 'independent' may not appear on the same construct as a 'seq' clause on a 'loop' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'seq' clause is here}}
 #pragma acc loop seq independent
   for(unsigned i = 0; i < 5; ++i);
   // expected-error at +2{{OpenACC clause 'auto' may not appear on the same construct as a 'independent' clause on a 'loop' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'independent' clause is here}}
 #pragma acc loop independent auto
   for(unsigned i = 0; i < 5; ++i);
   // expected-error at +2{{OpenACC clause 'seq' may not appear on the same construct as a 'independent' clause on a 'loop' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'independent' clause is here}}
 #pragma acc loop independent seq
   for(unsigned i = 0; i < 5; ++i);
 
   // expected-error at +2{{OpenACC clause 'seq' may not appear on the same construct as a 'seq' clause on a 'loop' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'seq' clause is here}}
 #pragma acc loop seq seq
   for(unsigned i = 0; i < 5; ++i);
   // expected-error at +2{{OpenACC clause 'independent' may not appear on the same construct as a 'independent' clause on a 'loop' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'independent' clause is here}}
 #pragma acc loop independent independent
   for(unsigned i = 0; i < 5; ++i);
   // expected-error at +2{{OpenACC clause 'auto' may not appear on the same construct as a 'auto' clause on a 'loop' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'auto' clause is here}}
 #pragma acc loop auto auto
   for(unsigned i = 0; i < 5; ++i);
 
@@ -589,19 +589,19 @@ void uses() {
 
   // 'seq' cannot be combined with 'gang', 'worker' or 'vector'
   // expected-error at +2{{OpenACC clause 'gang' may not appear on the same construct as a 'seq' clause on a 'loop' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'seq' clause is here}}
 #pragma acc loop seq gang
   for(unsigned i = 0; i < 5; ++i);
   // expected-error at +2{{OpenACC clause 'seq' may not appear on the same construct as a 'gang' clause on a 'loop' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'gang' clause is here}}
 #pragma acc loop gang seq
   for(unsigned i = 0; i < 5; ++i);
   // expected-error at +2{{OpenACC clause 'worker' may not appear on the same construct as a 'seq' clause on a 'loop' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'seq' clause is here}}
 #pragma acc loop seq worker
   for(unsigned i = 0; i < 5; ++i);
   // expected-error at +2{{OpenACC clause 'vector' may not appear on the same construct as a 'seq' clause on a 'loop' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'seq' clause is here}}
 #pragma acc loop seq vector
   for(unsigned i = 0; i < 5; ++i);
   // expected-error at +1{{OpenACC 'finalize' clause is not valid on 'loop' directive}}
@@ -733,15 +733,15 @@ void uses() {
   for(unsigned i = 0; i < 5; ++i);
 
   // expected-error at +2{{OpenACC clause 'seq' may not appear on the same construct as a 'gang' clause on a 'loop' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'gang' clause is here}}
 #pragma acc loop gang seq
   for(unsigned i = 0; i < 5; ++i);
   // expected-error at +2{{OpenACC clause 'seq' may not appear on the same construct as a 'worker' clause on a 'loop' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'worker' clause is here}}
 #pragma acc loop worker seq
   for(unsigned i = 0; i < 5; ++i);
   // expected-error at +2{{OpenACC clause 'seq' may not appear on the same construct as a 'vector' clause on a 'loop' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'vector' clause is here}}
 #pragma acc loop vector seq
   for(unsigned i = 0; i < 5; ++i);
   // expected-error at +1{{OpenACC 'finalize' clause is not valid on 'loop' directive}}

diff  --git a/clang/test/SemaOpenACC/loop-construct-collapse-clause.cpp b/clang/test/SemaOpenACC/loop-construct-collapse-clause.cpp
index cbaf414c04453..784e657cccb53 100644
--- a/clang/test/SemaOpenACC/loop-construct-collapse-clause.cpp
+++ b/clang/test/SemaOpenACC/loop-construct-collapse-clause.cpp
@@ -16,7 +16,7 @@ void only_for_loops() {
 
 void only_one_on_loop() {
   // expected-error at +2{{OpenACC 'collapse' clause cannot appear more than once on a 'loop' directive}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'collapse' clause is here}}
 #pragma acc loop collapse(1) collapse(1)
   for(int i = 0; i < 5; ++i);
 }
@@ -530,8 +530,8 @@ void allow_multiple_collapse() {
 
 void no_dupes_since_last_device_type() {
   // expected-error at +3{{OpenACC 'collapse' clause cannot appear more than once in a 'device_type' region on a 'loop' directive}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'collapse' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc loop collapse(1) device_type(*) collapse(1) collapse(2)
   for(unsigned i = 0; i < 5; ++i)
     for(unsigned j = 0; j < 5; ++j);

diff  --git a/clang/test/SemaOpenACC/loop-construct-device_type-clause.c b/clang/test/SemaOpenACC/loop-construct-device_type-clause.c
index 24da7ed88ff70..e16549a9a1b9e 100644
--- a/clang/test/SemaOpenACC/loop-construct-device_type-clause.c
+++ b/clang/test/SemaOpenACC/loop-construct-device_type-clause.c
@@ -116,7 +116,7 @@ void uses() {
 #pragma acc loop device_type(*) present(Var)
   for(int i = 0; i < 5; ++i);
   // expected-error at +2{{OpenACC clause 'private' may not follow a 'device_type' clause in a 'loop' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc loop device_type(*) private(Var)
   for(int i = 0; i < 5; ++i);
   // expected-error at +1{{OpenACC 'copyout' clause is not valid on 'loop' directive}}
@@ -147,7 +147,7 @@ void uses() {
 #pragma acc loop device_type(*) present_or_create(Var)
   for(int i = 0; i < 5; ++i);
   // expected-error at +2{{OpenACC clause 'reduction' may not follow a 'device_type' clause in a 'loop' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc loop device_type(*) reduction(+:Var)
   for(int i = 0; i < 5; ++i);
 #pragma acc loop device_type(*) collapse(1)

diff  --git a/clang/test/SemaOpenACC/loop-construct-gang-clause.cpp b/clang/test/SemaOpenACC/loop-construct-gang-clause.cpp
index 6b4c03bbc50c6..19a5f440759b4 100644
--- a/clang/test/SemaOpenACC/loop-construct-gang-clause.cpp
+++ b/clang/test/SemaOpenACC/loop-construct-gang-clause.cpp
@@ -239,13 +239,13 @@ void KernelsTempl() {
   for(int i = 0; i < 5; ++i);
 
   // expected-error at +3{{'num' argument to 'gang' clause not allowed on a 'loop' construct associated with a 'kernels' construct that has a 'num_gangs' clause}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'num_gangs' clause is here}}
 #pragma acc kernels num_gangs(t)
 #pragma acc loop gang(t)
   for(int i = 0; i < 5; ++i);
 
   // expected-error at +3{{'num' argument to 'gang' clause not allowed on a 'loop' construct associated with a 'kernels' construct that has a 'num_gangs' clause}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'num_gangs' clause is here}}
 #pragma acc kernels num_gangs(t)
 #pragma acc loop gang(num:t)
   for(int i = 0; i < 5; ++i);
@@ -264,13 +264,13 @@ void Kernels() {
   for(int i = 0; i < 5; ++i);
 
   // expected-error at +3{{'num' argument to 'gang' clause not allowed on a 'loop' construct associated with a 'kernels' construct that has a 'num_gangs' clause}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'num_gangs' clause is here}}
 #pragma acc kernels num_gangs(1)
 #pragma acc loop gang(1)
   for(int i = 0; i < 5; ++i);
 
   // expected-error at +3{{'num' argument to 'gang' clause not allowed on a 'loop' construct associated with a 'kernels' construct that has a 'num_gangs' clause}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'num_gangs' clause is here}}
 #pragma acc kernels num_gangs(1)
 #pragma acc loop gang(num:1)
   for(int i = 0; i < 5; ++i);
@@ -279,7 +279,7 @@ void Kernels() {
 #pragma acc loop gang(num:1)
   for(int j = 0; j < 5; ++j) {
     // expected-error at +2{{loop with a 'gang' clause may not exist in the region of a 'gang' clause on a 'kernels' construct}}
-    // expected-note at -3{{previous clause is here}}
+    // expected-note at -3{{previous 'gang' clause is here}}
 #pragma acc loop gang(static:1)
     for(int i = 0; i < 5; ++i);
   }

diff  --git a/clang/test/SemaOpenACC/loop-construct-reduction-clause.cpp b/clang/test/SemaOpenACC/loop-construct-reduction-clause.cpp
index 08918a97320fc..bbcfffbc49256 100644
--- a/clang/test/SemaOpenACC/loop-construct-reduction-clause.cpp
+++ b/clang/test/SemaOpenACC/loop-construct-reduction-clause.cpp
@@ -54,7 +54,7 @@ void uses() {
 #pragma acc loop reduction(+:I)
     for(int i = 0; i < 5; ++i) {
     // expected-error at +2{{OpenACC 'reduction' variable must have the same operator in all nested constructs (& vs +)}}
-    // expected-note at -3{{previous clause is here}}
+    // expected-note at -3{{previous 'reduction' clause is here}}
 #pragma acc loop reduction(&:I)
       for(int i = 0; i < 5; ++i) {
       }
@@ -66,7 +66,7 @@ void uses() {
 #pragma acc loop reduction(+:I)
     for(int i = 0; i < 5; ++i) {
     // expected-error at +2{{OpenACC 'reduction' variable must have the same operator in all nested constructs (& vs +)}}
-    // expected-note at -3{{previous clause is here}}
+    // expected-note at -3{{previous 'reduction' clause is here}}
 #pragma acc loop reduction(&:I)
       for(int i = 0; i < 5; ++i) {
       }
@@ -79,7 +79,7 @@ void uses() {
     for(int i = 0; i < 5; ++i) {
 #pragma acc serial
     // expected-error at +2{{OpenACC 'reduction' variable must have the same operator in all nested constructs (& vs +)}}
-    // expected-note at -4{{previous clause is here}}
+    // expected-note at -4{{previous 'reduction' clause is here}}
 #pragma acc loop reduction(&:I)
       for(int i = 0; i < 5; ++i) {
       }
@@ -88,7 +88,7 @@ void uses() {
 
 #pragma acc serial reduction(+:I)
     // expected-error at +2{{OpenACC 'reduction' variable must have the same operator in all nested constructs (& vs +)}}
-    // expected-note at -2{{previous clause is here}}
+    // expected-note at -2{{previous 'reduction' clause is here}}
 #pragma acc loop reduction(&:I)
   for(int i = 0; i < 5; ++i){}
 
@@ -96,7 +96,7 @@ void uses() {
 #pragma acc loop reduction(&:I)
   for(int i = 0; i < 5; ++i) {
     // expected-error at +2{{OpenACC 'reduction' variable must have the same operator in all nested constructs (+ vs &)}}
-    // expected-note at -3{{previous clause is here}}
+    // expected-note at -3{{previous 'reduction' clause is here}}
 #pragma acc serial reduction(+:I)
     ;
   }
@@ -111,7 +111,7 @@ void uses() {
 #pragma acc parallel
   {
   // expected-error at +2{{OpenACC 'gang' clause with a 'dim' value greater than 1 cannot appear on the same 'loop' construct as a 'reduction' clause}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'reduction' clause is here}}
 #pragma acc loop reduction(+:I) gang(dim:2)
     for(int i = 0; i < 5; ++i) {
     }
@@ -120,7 +120,7 @@ void uses() {
 #pragma acc parallel
   {
   // expected-error at +2{{OpenACC 'reduction' clause cannot appear on the same 'loop' construct as a 'gang' clause with a 'dim' value greater than 1}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'gang' clause is here}}
 #pragma acc loop gang(dim:2) reduction(+:I)
     for(int i = 0; i < 5; ++i) {
     }
@@ -129,7 +129,7 @@ void uses() {
 #pragma acc parallel
   {
   // expected-error at +2{{OpenACC 'reduction' clause cannot appear on the same 'loop' construct as a 'gang' clause with a 'dim' value greater than 1}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'gang' clause is here}}
 #pragma acc loop gang gang(dim:1) gang(dim:2) reduction(+:I)
     for(int i = 0; i < 5; ++i) {
     }
@@ -138,8 +138,8 @@ void uses() {
 #pragma acc parallel num_gangs(1, 2)
   {
     // expected-error at +3{{OpenACC 'reduction' clause cannot appear on the same 'loop' construct as a 'gang' clause inside a compute construct with a 'num_gangs' clause with more than one argument}}
-    // expected-note at +2{{previous clause is here}}
-    // expected-note at -4{{previous clause is here}}
+    // expected-note at +2{{previous 'gang' clause is here}}
+    // expected-note at -4{{previous 'num_gangs' clause is here}}
 #pragma acc loop gang(dim:1) reduction(+:I)
     for(int i = 0; i < 5; ++i) {
     }
@@ -148,8 +148,8 @@ void uses() {
 #pragma acc parallel num_gangs(2, 3)
   {
     // expected-error at +3{{OpenACC 'gang' clause cannot appear on the same 'loop' construct as a 'reduction' clause inside a compute construct with a 'num_gangs' clause with more than one argument}}
-    // expected-note at +2{{previous clause is here}}
-    // expected-note at -4{{previous clause is here}}
+    // expected-note at +2{{previous 'reduction' clause is here}}
+    // expected-note at -4{{previous 'num_gangs' clause is here}}
 #pragma acc loop reduction(+:I) gang(dim:1)
     for(int i = 0; i < 5; ++i) {
     }
@@ -190,7 +190,7 @@ void templ_uses() {
 #pragma acc loop reduction(+:I)
     for(int i = 0; i < 5; ++i) {
     // expected-error at +2{{OpenACC 'reduction' variable must have the same operator in all nested constructs (& vs +)}}
-    // expected-note at -3{{previous clause is here}}
+    // expected-note at -3{{previous 'reduction' clause is here}}
 #pragma acc loop reduction(&:I)
       for(int i = 0; i < 5; ++i) {
       }
@@ -202,7 +202,7 @@ void templ_uses() {
 #pragma acc loop reduction(+:Array[3])
     for(int i = 0; i < 5; ++i) {
     // expected-error at +2{{OpenACC 'reduction' variable must have the same operator in all nested constructs (& vs +)}}
-    // expected-note at -3{{previous clause is here}}
+    // expected-note at -3{{previous 'reduction' clause is here}}
 #pragma acc loop reduction(&:Array[3])
       for(int i = 0; i < 5; ++i) {
       }
@@ -214,7 +214,7 @@ void templ_uses() {
 #pragma acc loop reduction(+:Array[0:3])
     for(int i = 0; i < 5; ++i) {
     // expected-error at +2{{OpenACC 'reduction' variable must have the same operator in all nested constructs (& vs +)}}
-    // expected-note at -3{{previous clause is here}}
+    // expected-note at -3{{previous 'reduction' clause is here}}
 #pragma acc loop reduction(&:Array[1:4])
       for(int i = 0; i < 5; ++i) {
       }
@@ -226,7 +226,7 @@ void templ_uses() {
 #pragma acc loop reduction(+:I)
     for(int i = 0; i < 5; ++i) {
     // expected-error at +2{{OpenACC 'reduction' variable must have the same operator in all nested constructs (& vs +)}}
-    // expected-note at -3{{previous clause is here}}
+    // expected-note at -3{{previous 'reduction' clause is here}}
 #pragma acc serial reduction(&:I)
       for(int i = 0; i < 5; ++i) {
       }
@@ -243,7 +243,7 @@ void templ_uses() {
 #pragma acc parallel
   {
   // expected-error at +2{{OpenACC 'gang' clause with a 'dim' value greater than 1 cannot appear on the same 'loop' construct as a 'reduction' clause}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'reduction' clause is here}}
 #pragma acc loop reduction(+:I) gang(dim:2)
     for(int i = 0; i < 5; ++i) {
     }
@@ -252,7 +252,7 @@ void templ_uses() {
 #pragma acc parallel
   {
   // expected-error at +2{{OpenACC 'reduction' clause cannot appear on the same 'loop' construct as a 'gang' clause with a 'dim' value greater than 1}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'gang' clause is here}}
 #pragma acc loop gang(dim:2) reduction(+:I)
     for(int i = 0; i < 5; ++i) {
     }
@@ -260,7 +260,7 @@ void templ_uses() {
 #pragma acc parallel
   {
   // expected-error at +2{{OpenACC 'gang' clause with a 'dim' value greater than 1 cannot appear on the same 'loop' construct as a 'reduction' clause}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'reduction' clause is here}}
 #pragma acc loop reduction(+:I) gang(dim:Two)
     for(int i = 0; i < 5; ++i) {
     }
@@ -269,7 +269,7 @@ void templ_uses() {
 #pragma acc parallel
   {
   // expected-error at +2{{OpenACC 'reduction' clause cannot appear on the same 'loop' construct as a 'gang' clause with a 'dim' value greater than 1}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'gang' clause is here}}
 #pragma acc loop gang(dim:Two) reduction(+:I)
     for(int i = 0; i < 5; ++i) {
     }
@@ -286,8 +286,8 @@ void templ_uses() {
 #pragma acc parallel num_gangs(Two, 1)
   {
     // expected-error at +3{{OpenACC 'gang' clause cannot appear on the same 'loop' construct as a 'reduction' clause inside a compute construct with a 'num_gangs' clause with more than one argument}}
-    // expected-note at +2{{previous clause is here}}
-    // expected-note at -4{{previous clause is here}}
+    // expected-note at +2{{previous 'reduction' clause is here}}
+    // expected-note at -4{{previous 'num_gangs' clause is here}}
 #pragma acc loop reduction(+:I) gang(dim:One)
     for(int i = 0; i < 5; ++i) {
     }
@@ -296,8 +296,8 @@ void templ_uses() {
 #pragma acc parallel num_gangs(Two, 1)
   {
     // expected-error at +3{{OpenACC 'reduction' clause cannot appear on the same 'loop' construct as a 'gang' clause inside a compute construct with a 'num_gangs' clause with more than one argument}}
-    // expected-note at +2{{previous clause is here}}
-    // expected-note at -4{{previous clause is here}}
+    // expected-note at +2{{previous 'gang' clause is here}}
+    // expected-note at -4{{previous 'num_gangs' clause is here}}
 #pragma acc loop gang(dim:One) reduction(+:I)
     for(int i = 0; i < 5; ++i) {
     }
@@ -313,8 +313,8 @@ void templ_uses() {
 #pragma acc parallel num_gangs(Two, 1)
   {
     // expected-error at +3{{OpenACC 'gang' clause cannot appear on the same 'loop' construct as a 'reduction' clause inside a compute construct with a 'num_gangs' clause with more than one argument}}
-    // expected-note at +2{{previous clause is here}}
-    // expected-note at -4{{previous clause is here}}
+    // expected-note at +2{{previous 'reduction' clause is here}}
+    // expected-note at -4{{previous 'num_gangs' clause is here}}
 #pragma acc loop reduction(+:I) gang(dim:1)
     for(int i = 0; i < 5; ++i) {
     }
@@ -323,8 +323,8 @@ void templ_uses() {
 #pragma acc parallel num_gangs(Two, 1)
   {
     // expected-error at +3{{OpenACC 'reduction' clause cannot appear on the same 'loop' construct as a 'gang' clause inside a compute construct with a 'num_gangs' clause with more than one argument}}
-    // expected-note at +2{{previous clause is here}}
-    // expected-note at -4{{previous clause is here}}
+    // expected-note at +2{{previous 'gang' clause is here}}
+    // expected-note at -4{{previous 'num_gangs' clause is here}}
 #pragma acc loop gang(dim:1) reduction(+:I)
     for(int i = 0; i < 5; ++i) {
     }
@@ -340,8 +340,8 @@ void templ_uses() {
 #pragma acc parallel num_gangs(2, 1)
   {
     // expected-error at +3{{OpenACC 'gang' clause cannot appear on the same 'loop' construct as a 'reduction' clause inside a compute construct with a 'num_gangs' clause with more than one argument}}
-    // expected-note at +2{{previous clause is here}}
-    // expected-note at -4{{previous clause is here}}
+    // expected-note at +2{{previous 'reduction' clause is here}}
+    // expected-note at -4{{previous 'num_gangs' clause is here}}
 #pragma acc loop reduction(+:I) gang(dim:One)
     for(int i = 0; i < 5; ++i) {
     }
@@ -350,8 +350,8 @@ void templ_uses() {
 #pragma acc parallel num_gangs(2, 1)
   {
     // expected-error at +3{{OpenACC 'reduction' clause cannot appear on the same 'loop' construct as a 'gang' clause inside a compute construct with a 'num_gangs' clause with more than one argument}}
-    // expected-note at +2{{previous clause is here}}
-    // expected-note at -4{{previous clause is here}}
+    // expected-note at +2{{previous 'gang' clause is here}}
+    // expected-note at -4{{previous 'num_gangs' clause is here}}
 #pragma acc loop gang(dim:One) reduction(+:I)
     for(int i = 0; i < 5; ++i) {
     }

diff  --git a/clang/test/SemaOpenACC/loop-construct-tile-clause.cpp b/clang/test/SemaOpenACC/loop-construct-tile-clause.cpp
index a5b24024d3e5b..cd5350492f054 100644
--- a/clang/test/SemaOpenACC/loop-construct-tile-clause.cpp
+++ b/clang/test/SemaOpenACC/loop-construct-tile-clause.cpp
@@ -145,7 +145,7 @@ void only_for_loops() {
 
 void only_one_on_loop() {
   // expected-error at +2{{OpenACC 'tile' clause cannot appear more than once on a 'loop' directive}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'tile' clause is here}}
 #pragma acc loop tile(1) tile(1)
   for(int i = 0; i < 5; ++i);
 }
@@ -410,8 +410,8 @@ void collapse_tile_depth() {
 }
 void no_dupes_since_last_device_type() {
   // expected-error at +3{{OpenACC 'tile' clause cannot appear more than once in a 'device_type' region on a 'loop' directive}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'tile' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc loop tile(1) device_type(*) tile(1) tile(2)
   for(unsigned i = 0; i < 5; ++i)
     for(unsigned j = 0; j < 5; ++j);

diff  --git a/clang/test/SemaOpenACC/loop-construct-vector-clause.cpp b/clang/test/SemaOpenACC/loop-construct-vector-clause.cpp
index 1fed82c510208..58b1c8bb3c91c 100644
--- a/clang/test/SemaOpenACC/loop-construct-vector-clause.cpp
+++ b/clang/test/SemaOpenACC/loop-construct-vector-clause.cpp
@@ -24,7 +24,7 @@ void TemplUses(Int I, NotInt NI, ConvertsToInt CTI) {
   for(int j = 0; j < 5; ++j);
 
   // expected-error at +3{{'length' argument to 'vector' clause not allowed on a 'loop' construct associated with a 'kernels' construct that has a 'vector_length' clause}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'vector_length' clause is here}}
 #pragma acc kernels vector_length(I)
 #pragma acc loop vector(length: CTI)
   for(int j = 0; j < 5; ++j);
@@ -33,7 +33,7 @@ void TemplUses(Int I, NotInt NI, ConvertsToInt CTI) {
   for(int i = 0; i < 5; ++i) {
     for(int j = 0; j < 5; ++j);
     // expected-error at +2{{loop with a 'vector' clause may not exist in the region of a 'vector' clause}}
-    // expected-note at -4{{previous clause is here}}
+    // expected-note at -4{{previous 'vector' clause is here}}
 #pragma acc loop vector
     for(int j = 0; j < 5; ++j);
     for(int j = 0; j < 5; ++j);
@@ -45,7 +45,7 @@ void TemplUses(Int I, NotInt NI, ConvertsToInt CTI) {
     // expected-error at +4{{loop with a 'vector' clause may not exist in the region of a 'vector' clause}}
     // expected-error at +3{{loop with a 'worker' clause may not exist in the region of a 'vector' clause}}
     // expected-error at +2{{loop with a 'gang' clause may not exist in the region of a 'vector' clause}}
-    // expected-note at -6 3{{previous clause is here}}
+    // expected-note at -6 3{{previous 'vector' clause is here}}
 #pragma acc loop vector, worker, gang
     for(int j = 0; j < 5; ++j);
     for(int j = 0; j < 5; ++j);
@@ -93,7 +93,7 @@ void uses() {
   for(int j = 0; j < 5; ++j);
 
   // expected-error at +3{{'length' argument to 'vector' clause not allowed on a 'loop' construct associated with a 'kernels' construct that has a 'vector_length' clause}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'vector_length' clause is here}}
 #pragma acc kernels vector_length(i)
 #pragma acc loop vector(length: i)
   for(int j = 0; j < 5; ++j);
@@ -102,7 +102,7 @@ void uses() {
   for(int i = 0; i < 5; ++i) {
     for(int j = 0; j < 5; ++j);
     // expected-error at +2{{loop with a 'vector' clause may not exist in the region of a 'vector' clause}}
-    // expected-note at -4{{previous clause is here}}
+    // expected-note at -4{{previous 'vector' clause is here}}
 #pragma acc loop vector
     for(int j = 0; j < 5; ++j);
     for(int j = 0; j < 5; ++j);
@@ -121,7 +121,7 @@ void uses() {
     // expected-error at +4{{loop with a 'vector' clause may not exist in the region of a 'vector' clause}}
     // expected-error at +3{{loop with a 'worker' clause may not exist in the region of a 'vector' clause}}
     // expected-error at +2{{loop with a 'gang' clause may not exist in the region of a 'vector' clause}}
-    // expected-note at -6 3{{previous clause is here}}
+    // expected-note at -6 3{{previous 'vector' clause is here}}
 #pragma acc loop vector, worker, gang
     for(int j = 0; j < 5; ++j);
     for(int j = 0; j < 5; ++j);

diff  --git a/clang/test/SemaOpenACC/loop-construct-worker-clause.cpp b/clang/test/SemaOpenACC/loop-construct-worker-clause.cpp
index 35c63e467a505..ec7d0a3925d9e 100644
--- a/clang/test/SemaOpenACC/loop-construct-worker-clause.cpp
+++ b/clang/test/SemaOpenACC/loop-construct-worker-clause.cpp
@@ -42,7 +42,7 @@ void TemplUses(NotInt NI, ConvertsToInt CTI, Int IsI) {
   for(int i = 0; i < 5; ++i);
 
   // expected-error at +3{{'num' argument to 'worker' clause not allowed on a 'loop' construct associated with a 'kernels' construct that has a 'num_workers' clause}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'num_workers' clause is here}}
 #pragma acc kernels num_workers(IsI)
 #pragma acc loop worker(num:CTI)
   for(int i = 0; i < 5; ++i);
@@ -124,7 +124,7 @@ void uses() {
   for(int i = 0; i < 5; ++i);
 
   // expected-error at +3{{'num' argument to 'worker' clause not allowed on a 'loop' construct associated with a 'kernels' construct that has a 'num_workers' clause}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'num_workers' clause is here}}
 #pragma acc kernels num_workers(i)
 #pragma acc loop worker(num:i)
   for(int i = 0; i < 5; ++i);
@@ -133,7 +133,7 @@ void uses() {
   for(int i= 0; i< 5; ++i) {
     // expected-error at +3{{loop with a 'worker' clause may not exist in the region of a 'worker' clause}}
     // expected-error at +2{{loop with a 'gang' clause may not exist in the region of a 'worker' clause}}
-    // expected-note at -4 2{{previous clause is here}}
+    // expected-note at -4 2{{previous 'worker' clause is here}}
 #pragma acc loop worker, gang
   for(int k = 0; k < 5; ++k);
   }
@@ -157,7 +157,7 @@ void uses() {
   for(int i= 0; i< 5; ++i) {
     // expected-error at +3{{loop with a 'worker' clause may not exist in the region of a 'worker' clause}}
     // expected-error at +2{{loop with a 'gang' clause may not exist in the region of a 'worker' clause}}
-    // expected-note at -4 2{{previous clause is here}}
+    // expected-note at -4 2{{previous 'worker' clause is here}}
 #pragma acc loop worker, gang
   for(int k = 0; k < 5; ++k);
   }
@@ -175,7 +175,7 @@ void uses() {
   for(int i= 0; i< 5; ++i) {
     // expected-error at +3{{loop with a 'worker' clause may not exist in the region of a 'worker' clause}}
     // expected-error at +2{{loop with a 'gang' clause may not exist in the region of a 'worker' clause}}
-    // expected-note at -4 2{{previous clause is here}}
+    // expected-note at -4 2{{previous 'worker' clause is here}}
 #pragma acc loop worker, gang
   for(int k = 0; k < 5; ++k);
   }
@@ -193,7 +193,7 @@ void uses() {
   for(int i= 0; i< 5; ++i) {
     // expected-error at +3{{loop with a 'worker' clause may not exist in the region of a 'worker' clause}}
     // expected-error at +2{{loop with a 'gang' clause may not exist in the region of a 'worker' clause}}
-    // expected-note at -4 2{{previous clause is here}}
+    // expected-note at -4 2{{previous 'worker' clause is here}}
 #pragma acc loop worker, gang
   for(int k = 0; k < 5; ++k);
   }

diff  --git a/clang/test/SemaOpenACC/routine-construct-clauses.cpp b/clang/test/SemaOpenACC/routine-construct-clauses.cpp
index 004a0694c7f59..0281d149c81d2 100644
--- a/clang/test/SemaOpenACC/routine-construct-clauses.cpp
+++ b/clang/test/SemaOpenACC/routine-construct-clauses.cpp
@@ -8,62 +8,62 @@ void Func2();
 #pragma acc routine(Func) nohost seq
 #pragma acc routine(Func) gang
 // expected-error at +2{{OpenACC clause 'bind' may not appear on the same construct as a 'bind' clause on a 'routine' construct}}
-// expected-note at +1{{previous clause is here}}
+// expected-note at +1{{previous 'bind' clause is here}}
 #pragma acc routine(Func) gang bind(a) bind(a)
 
 // expected-error at +2{{OpenACC clause 'bind' may not appear on the same construct as a 'bind' clause on a 'routine' construct}}
-// expected-note at +1{{previous clause is here}}
+// expected-note at +1{{previous 'bind' clause is here}}
 #pragma acc routine gang bind(a) bind(a)
 void DupeImplName();
 
 // Only 1 of worker, vector, seq, gang.
 // expected-error at +2{{OpenACC clause 'vector' may not appear on the same construct as a 'worker' clause on a 'routine' construct}}
-// expected-note at +1{{previous clause is here}}
+// expected-note at +1{{previous 'worker' clause is here}}
 #pragma acc routine(Func) worker vector
 // expected-error at +2{{OpenACC clause 'seq' may not appear on the same construct as a 'worker' clause on a 'routine' construct}}
-// expected-note at +1{{previous clause is here}}
+// expected-note at +1{{previous 'worker' clause is here}}
 #pragma acc routine(Func) worker seq
 // expected-error at +2{{OpenACC clause 'gang' may not appear on the same construct as a 'worker' clause on a 'routine' construct}}
-// expected-note at +1{{previous clause is here}}
+// expected-note at +1{{previous 'worker' clause is here}}
 #pragma acc routine(Func) worker gang
 // expected-error at +2{{OpenACC clause 'worker' may not appear on the same construct as a 'worker' clause on a 'routine' construct}}
-// expected-note at +1{{previous clause is here}}
+// expected-note at +1{{previous 'worker' clause is here}}
 #pragma acc routine(Func) worker worker
 // expected-error at +2{{OpenACC clause 'worker' may not appear on the same construct as a 'vector' clause on a 'routine' construct}}
-// expected-note at +1{{previous clause is here}}
+// expected-note at +1{{previous 'vector' clause is here}}
 #pragma acc routine(Func) vector worker
 // expected-error at +2{{OpenACC clause 'seq' may not appear on the same construct as a 'vector' clause on a 'routine' construct}}
-// expected-note at +1{{previous clause is here}}
+// expected-note at +1{{previous 'vector' clause is here}}
 #pragma acc routine(Func) vector seq
 // expected-error at +2{{OpenACC clause 'gang' may not appear on the same construct as a 'vector' clause on a 'routine' construct}}
-// expected-note at +1{{previous clause is here}}
+// expected-note at +1{{previous 'vector' clause is here}}
 #pragma acc routine(Func) vector gang
 // expected-error at +2{{OpenACC clause 'vector' may not appear on the same construct as a 'vector' clause on a 'routine' construct}}
-// expected-note at +1{{previous clause is here}}
+// expected-note at +1{{previous 'vector' clause is here}}
 #pragma acc routine(Func) vector vector
 // expected-error at +2{{OpenACC clause 'worker' may not appear on the same construct as a 'seq' clause on a 'routine' construct}}
-// expected-note at +1{{previous clause is here}}
+// expected-note at +1{{previous 'seq' clause is here}}
 #pragma acc routine(Func) seq worker
 // expected-error at +2{{OpenACC clause 'vector' may not appear on the same construct as a 'seq' clause on a 'routine' construct}}
-// expected-note at +1{{previous clause is here}}
+// expected-note at +1{{previous 'seq' clause is here}}
 #pragma acc routine(Func) seq vector
 // expected-error at +2{{OpenACC clause 'gang' may not appear on the same construct as a 'seq' clause on a 'routine' construct}}
-// expected-note at +1{{previous clause is here}}
+// expected-note at +1{{previous 'seq' clause is here}}
 #pragma acc routine(Func) seq gang
 // expected-error at +2{{OpenACC clause 'seq' may not appear on the same construct as a 'seq' clause on a 'routine' construct}}
-// expected-note at +1{{previous clause is here}}
+// expected-note at +1{{previous 'seq' clause is here}}
 #pragma acc routine(Func) seq seq
 // expected-error at +2{{OpenACC clause 'worker' may not appear on the same construct as a 'gang' clause on a 'routine' construct}}
-// expected-note at +1{{previous clause is here}}
+// expected-note at +1{{previous 'gang' clause is here}}
 #pragma acc routine(Func) gang worker
 // expected-error at +2{{OpenACC clause 'vector' may not appear on the same construct as a 'gang' clause on a 'routine' construct}}
-// expected-note at +1{{previous clause is here}}
+// expected-note at +1{{previous 'gang' clause is here}}
 #pragma acc routine(Func) gang vector
 // expected-error at +2{{OpenACC clause 'seq' may not appear on the same construct as a 'gang' clause on a 'routine' construct}}
-// expected-note at +1{{previous clause is here}}
+// expected-note at +1{{previous 'gang' clause is here}}
 #pragma acc routine(Func) gang seq
 // expected-error at +2{{OpenACC clause 'gang' may not appear on the same construct as a 'gang' clause on a 'routine' construct}}
-// expected-note at +1{{previous clause is here}}
+// expected-note at +1{{previous 'gang' clause is here}}
 #pragma acc routine(Func) gang gang
 // expected-error at +1{{OpenACC 'routine' construct must have at least one 'gang', 'seq', 'vector', or 'worker' clause}}
 #pragma acc routine(Func)
@@ -153,10 +153,10 @@ void Func6();
 #pragma acc routine(Func6) seq device_type(*) bind(WhateverElse)
 #pragma acc routine(Func) seq dtype(*) device_type(*)
 // expected-error at +2{{OpenACC clause 'nohost' may not follow a 'dtype' clause in a 'routine' construct}}
-// expected-note at +1{{previous clause is here}}
+// expected-note at +1{{active 'dtype' clause here}}
 #pragma acc routine(Func) seq dtype(*) nohost
 // expected-error at +2{{OpenACC clause 'nohost' may not follow a 'device_type' clause in a 'routine' construct}}
-// expected-note at +1{{previous clause is here}}
+// expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine(Func) seq device_type(*) nohost
 
 // 2.15: a bind clause may not bind to a routine name that has a visible bind clause.
@@ -165,7 +165,7 @@ void Func3();
 // OK: Doesn't have a bind
 #pragma acc routine(Func3) seq
 // expected-error at +2{{multiple 'routine' directives with 'bind' clauses are not permitted to refer to the same function}}
-// expected-note at -4{{previous clause is here}}
+// expected-note at -4{{previous 'bind' clause is here}}
 #pragma acc routine(Func3) seq bind("asdf")
 
 void Func4();
@@ -173,12 +173,12 @@ void Func4();
 #pragma acc routine(Func4) seq
 #pragma acc routine(Func4) seq bind("asdf")
 // expected-error at +2{{multiple 'routine' directives with 'bind' clauses are not permitted to refer to the same function}}
-// expected-note at -2{{previous clause is here}}
+// expected-note at -2{{previous 'bind' clause is here}}
 #pragma acc routine(Func4) seq bind("asdf")
 void Func5();
 #pragma acc routine(Func5) seq bind("asdf")
 // expected-error at +2{{multiple 'routine' directives with 'bind' clauses are not permitted to refer to the same function}}
-// expected-note at -2{{previous clause is here}}
+// expected-note at -2{{previous 'bind' clause is here}}
 #pragma acc routine(Func5) seq bind("asdf")
 // OK: Doesn't have a bind
 #pragma acc routine(Func5) seq
@@ -196,15 +196,15 @@ void DupeBinds2();
 
 #pragma acc routine bind("asdf") seq
 void DupeBinds3();
-// expected-error at +2{{OpenACC 'bind' clause on a declaration must bind to the same name as previous bind clauses}}
-// expected-note at -3{{previous clause is here}}
+// expected-error at +2{{OpenACC 'bind' clause on a declaration must bind to the same name as previous 'bind' clauses}}
+// expected-note at -3{{previous 'bind' clause is here}}
 #pragma acc routine bind(asdf) seq
 void DupeBinds3();
 
 void DupeBinds4();
 #pragma acc routine(DupeBinds4) bind(asdf) seq
 // expected-error at +2{{multiple 'routine' directives with 'bind' clauses are not permitted to refer to the same function}}
-// expected-note at -2{{previous clause is here}}
+// expected-note at -2{{previous 'bind' clause is here}}
 #pragma acc routine bind(asdf) seq
 void DupeBinds4();
 
@@ -216,15 +216,15 @@ void DupeBinds4b();
 
 #pragma acc routine bind(asdf) seq
 void DupeBinds5();
-// expected-error at +2{{OpenACC 'bind' clause on a declaration must bind to the same name as previous bind clauses}}
-// expected-note at -3{{previous clause is here}}
+// expected-error at +2{{OpenACC 'bind' clause on a declaration must bind to the same name as previous 'bind' clauses}}
+// expected-note at -3{{previous 'bind' clause is here}}
 #pragma acc routine bind(asdfDiff) seq
 void DupeBinds5();
 
 #pragma acc routine bind("asdf") seq
 void DupeBinds6();
-// expected-error at +2{{OpenACC 'bind' clause on a declaration must bind to the same name as previous bind clauses}}
-// expected-note at -3{{previous clause is here}}
+// expected-error at +2{{OpenACC 'bind' clause on a declaration must bind to the same name as previous 'bind' clauses}}
+// expected-note at -3{{previous 'bind' clause is here}}
 #pragma acc routine bind("asdfDiff") seq
 void DupeBinds6();
 
@@ -234,67 +234,67 @@ void DupeBinds6();
 namespace FigureDupesAllowedAroundDeviceType {
   // Test conflicts without a device type
   // expected-error at +2{{OpenACC clause 'gang' may not appear on the same construct as a 'gang' clause on a 'routine' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'gang' clause is here}}
 #pragma acc routine gang gang
   void Func1();
   // expected-error at +2{{OpenACC clause 'worker' may not appear on the same construct as a 'gang' clause on a 'routine' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'gang' clause is here}}
 #pragma acc routine gang worker
   void Func2();
   // expected-error at +2{{OpenACC clause 'vector' may not appear on the same construct as a 'gang' clause on a 'routine' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'gang' clause is here}}
 #pragma acc routine gang vector
   void Func3();
   // expected-error at +2{{OpenACC clause 'seq' may not appear on the same construct as a 'gang' clause on a 'routine' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'gang' clause is here}}
 #pragma acc routine gang seq
   void Func4();
   // expected-error at +2{{OpenACC clause 'gang' may not appear on the same construct as a 'worker' clause on a 'routine' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'worker' clause is here}}
 #pragma acc routine worker gang
   void Func5();
   // expected-error at +2{{OpenACC clause 'worker' may not appear on the same construct as a 'worker' clause on a 'routine' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'worker' clause is here}}
 #pragma acc routine worker worker
   void Func6();
   // expected-error at +2{{OpenACC clause 'vector' may not appear on the same construct as a 'worker' clause on a 'routine' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'worker' clause is here}}
 #pragma acc routine worker vector
   void Func7();
   // expected-error at +2{{OpenACC clause 'seq' may not appear on the same construct as a 'worker' clause on a 'routine' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'worker' clause is here}}
 #pragma acc routine worker seq
   void Func8();
   // expected-error at +2{{OpenACC clause 'gang' may not appear on the same construct as a 'vector' clause on a 'routine' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'vector' clause is here}}
 #pragma acc routine vector gang
   void Func9();
   // expected-error at +2{{OpenACC clause 'worker' may not appear on the same construct as a 'vector' clause on a 'routine' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'vector' clause is here}}
 #pragma acc routine vector worker
   void Func10();
   // expected-error at +2{{OpenACC clause 'vector' may not appear on the same construct as a 'vector' clause on a 'routine' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'vector' clause is here}}
 #pragma acc routine vector vector
   void Func11();
   // expected-error at +2{{OpenACC clause 'seq' may not appear on the same construct as a 'vector' clause on a 'routine' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'vector' clause is here}}
 #pragma acc routine vector seq
   void Func12();
   // expected-error at +2{{OpenACC clause 'gang' may not appear on the same construct as a 'seq' clause on a 'routine' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'seq' clause is here}}
 #pragma acc routine seq gang
   void Func13();
   // expected-error at +2{{OpenACC clause 'worker' may not appear on the same construct as a 'seq' clause on a 'routine' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'seq' clause is here}}
 #pragma acc routine seq worker
   void Func14();
   // expected-error at +2{{OpenACC clause 'vector' may not appear on the same construct as a 'seq' clause on a 'routine' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'seq' clause is here}}
 #pragma acc routine seq vector
   void Func15();
   // expected-error at +2{{OpenACC clause 'seq' may not appear on the same construct as a 'seq' clause on a 'routine' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'seq' clause is here}}
 #pragma acc routine seq seq
   void Func16();
   // None included for one without a device type
@@ -304,67 +304,67 @@ namespace FigureDupesAllowedAroundDeviceType {
 
   // Check same conflicts for 'before' the device_type
   // expected-error at +2{{OpenACC clause 'gang' may not appear on the same construct as a 'gang' clause on a 'routine' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'gang' clause is here}}
 #pragma acc routine gang gang device_type(*)
   void Func17();
   // expected-error at +2{{OpenACC clause 'worker' may not appear on the same construct as a 'gang' clause on a 'routine' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'gang' clause is here}}
 #pragma acc routine gang worker device_type(*)
   void Func18();
   // expected-error at +2{{OpenACC clause 'vector' may not appear on the same construct as a 'gang' clause on a 'routine' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'gang' clause is here}}
 #pragma acc routine gang vector device_type(*)
   void Func19();
   // expected-error at +2{{OpenACC clause 'seq' may not appear on the same construct as a 'gang' clause on a 'routine' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'gang' clause is here}}
 #pragma acc routine gang seq device_type(*)
   void Func20();
   // expected-error at +2{{OpenACC clause 'gang' may not appear on the same construct as a 'worker' clause on a 'routine' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'worker' clause is here}}
 #pragma acc routine worker gang device_type(*)
   void Func21();
   // expected-error at +2{{OpenACC clause 'worker' may not appear on the same construct as a 'worker' clause on a 'routine' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'worker' clause is here}}
 #pragma acc routine worker worker device_type(*)
   void Func22();
   // expected-error at +2{{OpenACC clause 'vector' may not appear on the same construct as a 'worker' clause on a 'routine' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'worker' clause is here}}
 #pragma acc routine worker vector device_type(*)
   void Func23();
   // expected-error at +2{{OpenACC clause 'seq' may not appear on the same construct as a 'worker' clause on a 'routine' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'worker' clause is here}}
 #pragma acc routine worker seq device_type(*)
   void Func24();
   // expected-error at +2{{OpenACC clause 'gang' may not appear on the same construct as a 'vector' clause on a 'routine' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'vector' clause is here}}
 #pragma acc routine vector gang device_type(*)
   void Func25();
   // expected-error at +2{{OpenACC clause 'worker' may not appear on the same construct as a 'vector' clause on a 'routine' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'vector' clause is here}}
 #pragma acc routine vector worker device_type(*)
   void Func26();
   // expected-error at +2{{OpenACC clause 'vector' may not appear on the same construct as a 'vector' clause on a 'routine' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'vector' clause is here}}
 #pragma acc routine vector vector device_type(*)
   void Func27();
   // expected-error at +2{{OpenACC clause 'seq' may not appear on the same construct as a 'vector' clause on a 'routine' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'vector' clause is here}}
 #pragma acc routine vector seq device_type(*)
   void Func28();
   // expected-error at +2{{OpenACC clause 'gang' may not appear on the same construct as a 'seq' clause on a 'routine' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'seq' clause is here}}
 #pragma acc routine seq gang device_type(*)
   void Func29();
   // expected-error at +2{{OpenACC clause 'worker' may not appear on the same construct as a 'seq' clause on a 'routine' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'seq' clause is here}}
 #pragma acc routine seq worker device_type(*)
   void Func30();
   // expected-error at +2{{OpenACC clause 'vector' may not appear on the same construct as a 'seq' clause on a 'routine' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'seq' clause is here}}
 #pragma acc routine seq vector device_type(*)
   void Func31();
   // expected-error at +2{{OpenACC clause 'seq' may not appear on the same construct as a 'seq' clause on a 'routine' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'seq' clause is here}}
 #pragma acc routine seq seq device_type(*)
   void Func32();
   // None included for the device_type
@@ -374,327 +374,327 @@ namespace FigureDupesAllowedAroundDeviceType {
 
   // Conflicts between 'global' and 'device_type'
   // expected-error at +3{{OpenACC clause 'gang' after 'device_type' clause on a 'routine' conflicts with the 'gang' clause before the first 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'gang' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine gang device_type(*) gang
   void Func34();
   // expected-error at +3{{OpenACC clause 'worker' after 'device_type' clause on a 'routine' conflicts with the 'gang' clause before the first 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'gang' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine gang device_type(*) worker
   void Func35();
   // expected-error at +3{{OpenACC clause 'vector' after 'device_type' clause on a 'routine' conflicts with the 'gang' clause before the first 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'gang' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine gang device_type(*) vector
   void Func36();
   // expected-error at +3{{OpenACC clause 'seq' after 'device_type' clause on a 'routine' conflicts with the 'gang' clause before the first 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'gang' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine gang device_type(*) seq
   void Func37();
   // expected-error at +3{{OpenACC clause 'gang' after 'device_type' clause on a 'routine' conflicts with the 'worker' clause before the first 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'worker' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine worker device_type(*) gang
   void Func38();
   // expected-error at +3{{OpenACC clause 'worker' after 'device_type' clause on a 'routine' conflicts with the 'worker' clause before the first 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'worker' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine worker device_type(*) worker
   void Func39();
   // expected-error at +3{{OpenACC clause 'vector' after 'device_type' clause on a 'routine' conflicts with the 'worker' clause before the first 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'worker' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine worker device_type(*) vector
   void Func40();
   // expected-error at +3{{OpenACC clause 'seq' after 'device_type' clause on a 'routine' conflicts with the 'worker' clause before the first 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'worker' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine worker device_type(*) seq
   void Func41();
   // expected-error at +3{{OpenACC clause 'gang' after 'device_type' clause on a 'routine' conflicts with the 'vector' clause before the first 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'vector' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine vector device_type(*) gang
   void Func42();
   // expected-error at +3{{OpenACC clause 'worker' after 'device_type' clause on a 'routine' conflicts with the 'vector' clause before the first 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'vector' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine vector device_type(*) worker
   void Func43();
   // expected-error at +3{{OpenACC clause 'vector' after 'device_type' clause on a 'routine' conflicts with the 'vector' clause before the first 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'vector' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine vector device_type(*) vector
   void Func44();
   // expected-error at +3{{OpenACC clause 'seq' after 'device_type' clause on a 'routine' conflicts with the 'vector' clause before the first 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'vector' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine vector device_type(*) seq
   void Func45();
   // expected-error at +3{{OpenACC clause 'gang' after 'device_type' clause on a 'routine' conflicts with the 'seq' clause before the first 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'seq' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine seq device_type(*) gang
   void Func46();
   // expected-error at +3{{OpenACC clause 'worker' after 'device_type' clause on a 'routine' conflicts with the 'seq' clause before the first 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'seq' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine seq device_type(*) worker
   void Func47();
   // expected-error at +3{{OpenACC clause 'vector' after 'device_type' clause on a 'routine' conflicts with the 'seq' clause before the first 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'seq' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine seq device_type(*) vector
   void Func48();
   // expected-error at +3{{OpenACC clause 'seq' after 'device_type' clause on a 'routine' conflicts with the 'seq' clause before the first 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'seq' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine seq device_type(*) seq
   void Func49();
 
   // Conflicts within same device_type
   // expected-error at +3{{OpenACC clause 'gang' on a 'routine' directive conflicts with the 'gang' clause applying to the same 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'gang' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine device_type(*) gang gang
   void Func50();
   // expected-error at +3{{OpenACC clause 'worker' on a 'routine' directive conflicts with the 'gang' clause applying to the same 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'gang' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine device_type(*) gang worker
   void Func51();
   // expected-error at +3{{OpenACC clause 'vector' on a 'routine' directive conflicts with the 'gang' clause applying to the same 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'gang' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine device_type(*) gang vector
   void Func52();
   // expected-error at +3{{OpenACC clause 'seq' on a 'routine' directive conflicts with the 'gang' clause applying to the same 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'gang' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine device_type(*) gang seq
   void Func53();
   // expected-error at +3{{OpenACC clause 'gang' on a 'routine' directive conflicts with the 'worker' clause applying to the same 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'worker' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine device_type(*) worker gang
   void Func54();
   // expected-error at +3{{OpenACC clause 'worker' on a 'routine' directive conflicts with the 'worker' clause applying to the same 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'worker' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine device_type(*) worker worker
   void Func55();
   // expected-error at +3{{OpenACC clause 'vector' on a 'routine' directive conflicts with the 'worker' clause applying to the same 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'worker' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine device_type(*) worker vector
   void Func56();
   // expected-error at +3{{OpenACC clause 'seq' on a 'routine' directive conflicts with the 'worker' clause applying to the same 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'worker' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine device_type(*) worker seq
   void Func57();
   // expected-error at +3{{OpenACC clause 'gang' on a 'routine' directive conflicts with the 'vector' clause applying to the same 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'vector' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine device_type(*) vector gang
   void Func58();
   // expected-error at +3{{OpenACC clause 'worker' on a 'routine' directive conflicts with the 'vector' clause applying to the same 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'vector' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine device_type(*) vector worker
   void Func59();
   // expected-error at +3{{OpenACC clause 'vector' on a 'routine' directive conflicts with the 'vector' clause applying to the same 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'vector' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine device_type(*) vector vector
   void Func60();
   // expected-error at +3{{OpenACC clause 'seq' on a 'routine' directive conflicts with the 'vector' clause applying to the same 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'vector' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine device_type(*) vector seq
   void Func61();
   // expected-error at +3{{OpenACC clause 'gang' on a 'routine' directive conflicts with the 'seq' clause applying to the same 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'seq' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine device_type(*) seq gang
   void Func62();
   // expected-error at +3{{OpenACC clause 'worker' on a 'routine' directive conflicts with the 'seq' clause applying to the same 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'seq' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine device_type(*) seq worker
   void Func63();
   // expected-error at +3{{OpenACC clause 'vector' on a 'routine' directive conflicts with the 'seq' clause applying to the same 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'seq' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine device_type(*) seq vector
   void Func64();
   // expected-error at +3{{OpenACC clause 'seq' on a 'routine' directive conflicts with the 'seq' clause applying to the same 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'seq' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine device_type(*) seq seq
   void Func65();
 
   // expected-error at +3{{OpenACC clause 'gang' on a 'routine' directive conflicts with the 'gang' clause applying to the same 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'gang' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine device_type(*) gang gang device_type(nvidia) seq
   void Func66();
   // expected-error at +3{{OpenACC clause 'worker' on a 'routine' directive conflicts with the 'gang' clause applying to the same 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'gang' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine device_type(*) gang worker device_type(nvidia) seq
   void Func67();
   // expected-error at +3{{OpenACC clause 'vector' on a 'routine' directive conflicts with the 'gang' clause applying to the same 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'gang' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine device_type(*) gang vector device_type(nvidia) seq
   void Func68();
   // expected-error at +3{{OpenACC clause 'seq' on a 'routine' directive conflicts with the 'gang' clause applying to the same 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'gang' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine device_type(*) gang seq device_type(nvidia) seq
   void Func69();
   // expected-error at +3{{OpenACC clause 'gang' on a 'routine' directive conflicts with the 'worker' clause applying to the same 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'worker' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine device_type(*) worker gang device_type(nvidia) seq
   void Func70();
   // expected-error at +3{{OpenACC clause 'worker' on a 'routine' directive conflicts with the 'worker' clause applying to the same 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'worker' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine device_type(*) worker worker device_type(nvidia) seq
   void Func71();
   // expected-error at +3{{OpenACC clause 'vector' on a 'routine' directive conflicts with the 'worker' clause applying to the same 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'worker' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine device_type(*) worker vector device_type(nvidia) seq
   void Func72();
   // expected-error at +3{{OpenACC clause 'seq' on a 'routine' directive conflicts with the 'worker' clause applying to the same 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'worker' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine device_type(*) worker seq device_type(nvidia) seq
   void Func73();
   // expected-error at +3{{OpenACC clause 'gang' on a 'routine' directive conflicts with the 'vector' clause applying to the same 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'vector' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine device_type(*) vector gang device_type(nvidia) seq
   void Func74();
   // expected-error at +3{{OpenACC clause 'worker' on a 'routine' directive conflicts with the 'vector' clause applying to the same 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'vector' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine device_type(*) vector worker device_type(nvidia) seq
   void Func75();
   // expected-error at +3{{OpenACC clause 'vector' on a 'routine' directive conflicts with the 'vector' clause applying to the same 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'vector' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine device_type(*) vector vector device_type(nvidia) seq
   void Func76();
   // expected-error at +3{{OpenACC clause 'seq' on a 'routine' directive conflicts with the 'vector' clause applying to the same 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'vector' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine device_type(*) vector seq device_type(nvidia) seq
   void Func77();
   // expected-error at +3{{OpenACC clause 'gang' on a 'routine' directive conflicts with the 'seq' clause applying to the same 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'seq' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine device_type(*) seq gang device_type(nvidia) seq
   void Func78();
   // expected-error at +3{{OpenACC clause 'worker' on a 'routine' directive conflicts with the 'seq' clause applying to the same 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'seq' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine device_type(*) seq worker device_type(nvidia) seq
   void Func79();
   // expected-error at +3{{OpenACC clause 'vector' on a 'routine' directive conflicts with the 'seq' clause applying to the same 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'seq' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine device_type(*) seq vector device_type(nvidia) seq
   void Func80();
   // expected-error at +3{{OpenACC clause 'seq' on a 'routine' directive conflicts with the 'seq' clause applying to the same 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'seq' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine device_type(*) seq seq device_type(nvidia) seq
   void Func81();
 
   // expected-error at +3{{OpenACC clause 'gang' on a 'routine' directive conflicts with the 'gang' clause applying to the same 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'gang' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine device_type(nvidia) seq device_type(*) gang gang
   void Func82();
   // expected-error at +3{{OpenACC clause 'worker' on a 'routine' directive conflicts with the 'gang' clause applying to the same 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'gang' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine device_type(nvidia) seq device_type(*) gang worker
   void Func83();
   // expected-error at +3{{OpenACC clause 'vector' on a 'routine' directive conflicts with the 'gang' clause applying to the same 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'gang' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine device_type(nvidia) seq device_type(*) gang vector
   void Func84();
   // expected-error at +3{{OpenACC clause 'seq' on a 'routine' directive conflicts with the 'gang' clause applying to the same 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'gang' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine device_type(nvidia) seq device_type(*) gang seq
   void Func85();
   // expected-error at +3{{OpenACC clause 'gang' on a 'routine' directive conflicts with the 'worker' clause applying to the same 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'worker' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine device_type(nvidia) seq device_type(*) worker gang
   void Func86();
   // expected-error at +3{{OpenACC clause 'worker' on a 'routine' directive conflicts with the 'worker' clause applying to the same 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'worker' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine device_type(nvidia) seq device_type(*) worker worker
   void Func87();
   // expected-error at +3{{OpenACC clause 'vector' on a 'routine' directive conflicts with the 'worker' clause applying to the same 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'worker' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine device_type(nvidia) seq device_type(*) worker vector
   void Func88();
   // expected-error at +3{{OpenACC clause 'seq' on a 'routine' directive conflicts with the 'worker' clause applying to the same 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'worker' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine device_type(nvidia) seq device_type(*) worker seq
   void Func89();
   // expected-error at +3{{OpenACC clause 'gang' on a 'routine' directive conflicts with the 'vector' clause applying to the same 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'vector' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine device_type(nvidia) seq device_type(*) vector gang
   void Func90();
   // expected-error at +3{{OpenACC clause 'worker' on a 'routine' directive conflicts with the 'vector' clause applying to the same 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'vector' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine device_type(nvidia) seq device_type(*) vector worker
   void Func91();
   // expected-error at +3{{OpenACC clause 'vector' on a 'routine' directive conflicts with the 'vector' clause applying to the same 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'vector' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine device_type(nvidia) seq device_type(*) vector vector
   void Func92();
   // expected-error at +3{{OpenACC clause 'seq' on a 'routine' directive conflicts with the 'vector' clause applying to the same 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'vector' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine device_type(nvidia) seq device_type(*) vector seq
   void Func93();
   // expected-error at +3{{OpenACC clause 'gang' on a 'routine' directive conflicts with the 'seq' clause applying to the same 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'seq' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine device_type(nvidia) seq device_type(*) seq gang
   void Func94();
   // expected-error at +3{{OpenACC clause 'worker' on a 'routine' directive conflicts with the 'seq' clause applying to the same 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'seq' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine device_type(nvidia) seq device_type(*) seq worker
   void Func95();
   // expected-error at +3{{OpenACC clause 'vector' on a 'routine' directive conflicts with the 'seq' clause applying to the same 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'seq' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine device_type(nvidia) seq device_type(*) seq vector
   void Func96();
   // expected-error at +3{{OpenACC clause 'seq' on a 'routine' directive conflicts with the 'seq' clause applying to the same 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'seq' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine device_type(nvidia) seq device_type(*) seq seq
   void Func97();
 
@@ -736,36 +736,36 @@ namespace FigureDupesAllowedAroundDeviceType {
 
 namespace BindDupes {
   // expected-error at +2{{OpenACC clause 'bind' may not appear on the same construct as a 'bind' clause on a 'routine' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'bind' clause is here}}
 #pragma acc routine seq bind(asdf) bind(asdf)
   void Func1();
   // expected-error at +2{{OpenACC clause 'bind' may not appear on the same construct as a 'bind' clause on a 'routine' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'bind' clause is here}}
 #pragma acc routine seq bind(asdf) bind(asdf) device_type(*)
   void Func2();
   // expected-error at +3{{OpenACC clause 'bind' after 'device_type' clause on a 'routine' conflicts with the 'bind' clause before the first 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'bind' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine seq bind(asdf) device_type(*) bind(asdf)
   void Func3();
   // expected-error at +3{{OpenACC clause 'bind' after 'device_type' clause on a 'routine' conflicts with the 'bind' clause before the first 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'bind' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine seq bind(asdf) device_type(*) bind(asdf) device_type(*)
   void Func4();
   // expected-error at +3{{OpenACC clause 'bind' on a 'routine' directive conflicts with the 'bind' clause applying to the same 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'bind' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine seq device_type(*) bind(asdf) bind(asdf)
   void Func5();
   // expected-error at +3{{OpenACC clause 'bind' on a 'routine' directive conflicts with the 'bind' clause applying to the same 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'bind' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine seq device_type(*) bind(asdf) bind(asdf) device_type(*)
   void Func6();
   // expected-error at +3{{OpenACC clause 'bind' on a 'routine' directive conflicts with the 'bind' clause applying to the same 'device_type'}}
-  // expected-note at +2{{previous clause is here}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +2{{previous 'bind' clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc routine seq device_type(*) bind(asdf) device_type(*) bind(asdf) bind(asdf)
   void Func7();
 

diff  --git a/clang/test/SemaOpenACC/set-construct.cpp b/clang/test/SemaOpenACC/set-construct.cpp
index 1a152b898ef4a..e0c713dda7073 100644
--- a/clang/test/SemaOpenACC/set-construct.cpp
+++ b/clang/test/SemaOpenACC/set-construct.cpp
@@ -54,18 +54,18 @@ void uses() {
 #pragma acc set if (true)
 
   // expected-error at +2{{'default_async' clause cannot appear more than once on a 'set' directive}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'default_async' clause is here}}
 #pragma acc set default_async(getI()) default_async(getI())
 
   // expected-error at +2{{'device_num' clause cannot appear more than once on a 'set' directive}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'device_num' clause is here}}
 #pragma acc set device_num(getI()) device_num(getI())
 
   // expected-error at +2{{'device_type' clause cannot appear more than once on a 'set' directive}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'device_type' clause is here}}
 #pragma acc set device_type(nvidia) device_type(default)
   // expected-error at +2{{'if' clause cannot appear more than once on a 'set' directive}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'if' clause is here}}
 #pragma acc set device_type(acc_device_nvidia) if(true) if (true)
 
   // expected-error at +2{{OpenACC 'device_type' clause on a 'set' construct only permits one architecture}}

diff  --git a/clang/test/SemaOpenACC/shutdown-construct.cpp b/clang/test/SemaOpenACC/shutdown-construct.cpp
index f13a281edcb0d..95cea90ddb74a 100644
--- a/clang/test/SemaOpenACC/shutdown-construct.cpp
+++ b/clang/test/SemaOpenACC/shutdown-construct.cpp
@@ -43,14 +43,14 @@ void TestInst() {
 #pragma acc shutdown if (T::value < T{})
 #pragma acc shutdown device_type(multicore) device_num(getI()) if (getI() < getS())
   // expected-error at +2{{OpenACC 'device_num' clause cannot appear more than once on a 'shutdown' directive}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'device_num' clause is here}}
 #pragma acc shutdown device_type(default) device_type(radeon) device_num(t) if (t < T::value) device_num(getI()) 
 
   // expected-error at +1{{value of type 'const NotConvertible' is not contextually convertible to 'bool'}}
 #pragma acc shutdown if (T::NCValue)
 
   // expected-error at +2{{OpenACC 'if' clause cannot appear more than once on a 'shutdown' directive}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'if' clause is here}}
 #pragma acc shutdown if(t < T::value) if (getI() < getS())
 
   // expected-error at +1{{OpenACC clause 'device_num' requires expression of integer type ('const NotConvertible' invalid)}}

diff  --git a/clang/test/SemaOpenACC/update-construct.cpp b/clang/test/SemaOpenACC/update-construct.cpp
index a89dc1f20158a..f6dd502739883 100644
--- a/clang/test/SemaOpenACC/update-construct.cpp
+++ b/clang/test/SemaOpenACC/update-construct.cpp
@@ -14,19 +14,19 @@ void uses() {
 #pragma acc update device(Var)
 
   // expected-error at +2{{OpenACC clause 'if' may not follow a 'device_type' clause in a 'update' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc update self(Var) device_type(default) if(true)
   // expected-error at +2{{OpenACC clause 'if_present' may not follow a 'device_type' clause in a 'update' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc update self(Var) device_type(multicore) if_present
   // expected-error at +2{{OpenACC clause 'self' may not follow a 'device_type' clause in a 'update' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc update self(Var) device_type(nvidia) self(Var)
   // expected-error at +2{{OpenACC clause 'host' may not follow a 'device_type' clause in a 'update' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc update self(Var) device_type(radeon) host(Var)
   // expected-error at +2{{OpenACC clause 'device' may not follow a 'device_type' clause in a 'update' construct}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{active 'device_type' clause here}}
 #pragma acc update self(Var) device_type(multicore) device(Var)
   // These 2 are OK.
 #pragma acc update self(Var) device_type(default) async
@@ -51,7 +51,7 @@ void uses() {
 #pragma acc update self(Var) if (NC) device_type(radeon)
 
   // expected-error at +2{{OpenACC 'if' clause cannot appear more than once on a 'update' directive}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'if' clause is here}}
 #pragma acc update self(Var) if(true) if (false)
 
   // Cannot be the body of an 'if', 'while', 'do', 'switch', or
@@ -89,7 +89,7 @@ void uses() {
   // expected-note at +1{{to match this '('}}
 #pragma acc update self(Var) async(getI(), getI())
   // expected-error at +2{{OpenACC 'async' clause cannot appear more than once on a 'update' directive}}
-  // expected-note at +1{{previous clause is here}}
+  // expected-note at +1{{previous 'async' clause is here}}
 #pragma acc update self(Var) async(getI()) async(getI())
   // expected-error at +1{{OpenACC clause 'async' requires expression of integer type ('struct NotConvertible' invalid)}}
 #pragma acc update self(Var) async(NC)


        


More information about the cfe-commits mailing list