[flang] Correct constraint numbers. Fix spelling error. Run clang-format.
authorSteve Scalpone <sscalpone@nvidia.com>
Thu, 11 Apr 2019 11:16:14 +0000 (04:16 -0700)
committerSteve Scalpone <sscalpone@nvidia.com>
Thu, 11 Apr 2019 11:16:14 +0000 (04:16 -0700)
Original-commit: flang-compiler/f18@59df0d39f335ba47da747e530dc8d7222d51e271
Reviewed-on: https://github.com/flang-compiler/f18/pull/401
Tree-same-pre-rewrite: false

flang/lib/semantics/check-deallocate.cc

index 2a3599d4a59002c4762bf022beaa98155c23b048..e70de6fcb63b6f08788c42c9c099c0f2ce10374d 100644 (file)
@@ -30,7 +30,7 @@ void DeallocateChecker::Leave(const parser::DeallocateStmt &deallocateStmt) {
               if (!IsVariableName(*symbol)) {
                 context_.messages().Say(name.source,
                     "name in DEALLOCATE statement must be a variable name"_err_en_US);
-              } else if (!IsAllocatableOrPointer(*symbol)) {  // C951
+              } else if (!IsAllocatableOrPointer(*symbol)) {  // C932
                 context_.messages().Say(name.source,
                     "name in DEALLOCATE statement must have the ALLOCATABLE or POINTER attribute"_err_en_US);
               }
@@ -39,7 +39,7 @@ void DeallocateChecker::Leave(const parser::DeallocateStmt &deallocateStmt) {
               evaluate::ExpressionAnalyzer analyzer{context_};
               if (MaybeExpr checked{analyzer.Analyze(structureComponent)}) {
                 if (!IsAllocatableOrPointer(
-                        *structureComponent.component.symbol)) {  // C951
+                        *structureComponent.component.symbol)) {  // C932
                   context_.messages().Say(structureComponent.component.source,
                       "component in DEALLOCATE statement must have the ALLOCATABLE or POINTER attribute"_err_en_US);
                 }
@@ -48,7 +48,7 @@ void DeallocateChecker::Leave(const parser::DeallocateStmt &deallocateStmt) {
         },
         allocateObject.u);
   }
-  // The parser is catchng dups too
+  // The parser is catching dups too
   bool gotStat{false}, gotMsg{false};
   for (const parser::StatOrErrmsg &deallocOpt :
       std::get<std::list<parser::StatOrErrmsg>>(deallocateStmt.t)) {
@@ -58,8 +58,9 @@ void DeallocateChecker::Leave(const parser::DeallocateStmt &deallocateStmt) {
               // ExpressionAnalyzer emits error messages
               evaluate::ExpressionAnalyzer analyzer{context_};
               (void)analyzer.Analyze(statVariable.v);
-              if(gotStat) {
-                  context_.Say("STAT may not be duplicated in a DEALLOCATE statement"_err_en_US);
+              if (gotStat) {
+                context_.Say(
+                    "STAT may not be duplicated in a DEALLOCATE statement"_err_en_US);
               }
               gotStat = true;
             },
@@ -67,8 +68,9 @@ void DeallocateChecker::Leave(const parser::DeallocateStmt &deallocateStmt) {
               // ExpressionAnalyzer emits error messages
               evaluate::ExpressionAnalyzer analyzer{context_};
               (void)analyzer.Analyze(msgVariable.v);
-              if(gotMsg) {
-                  context_.Say("ERRMSG may not be duplicated in a DEALLOCATE statement"_err_en_US);
+              if (gotMsg) {
+                context_.Say(
+                    "ERRMSG may not be duplicated in a DEALLOCATE statement"_err_en_US);
               }
               gotMsg = true;
             },