[clang] d3c0165 - [clang][Interp][NFC] Remove unnecessary include from State.h
Timm Bäder via cfe-commits
cfe-commits at lists.llvm.org
Thu May 4 01:23:47 PDT 2023
Author: Timm Bäder
Date: 2023-05-04T10:21:01+02:00
New Revision: d3c01652448231ad24eb9abfc6af95f58f865f07
URL: https://github.com/llvm/llvm-project/commit/d3c01652448231ad24eb9abfc6af95f58f865f07
DIFF: https://github.com/llvm/llvm-project/commit/d3c01652448231ad24eb9abfc6af95f58f865f07.diff
LOG: [clang][Interp][NFC] Remove unnecessary include from State.h
Forward-declare OptionalDiagnostic instead. And turn a few comments in
to doc comments.
Added:
Modified:
clang/lib/AST/Interp/State.cpp
clang/lib/AST/Interp/State.h
Removed:
################################################################################
diff --git a/clang/lib/AST/Interp/State.cpp b/clang/lib/AST/Interp/State.cpp
index 251297925760..f67bde1082fa 100644
--- a/clang/lib/AST/Interp/State.cpp
+++ b/clang/lib/AST/Interp/State.cpp
@@ -11,6 +11,7 @@
#include "Program.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/CXXInheritance.h"
+#include "clang/AST/OptionalDiagnostic.h"
using namespace clang;
using namespace clang::interp;
diff --git a/clang/lib/AST/Interp/State.h b/clang/lib/AST/Interp/State.h
index 131fbcf3cffc..d897b7c20275 100644
--- a/clang/lib/AST/Interp/State.h
+++ b/clang/lib/AST/Interp/State.h
@@ -15,9 +15,9 @@
#include "clang/AST/ASTDiagnostic.h"
#include "clang/AST/Expr.h"
-#include "clang/AST/OptionalDiagnostic.h"
namespace clang {
+class OptionalDiagnostic;
/// Kinds of access we can perform on an object, for diagnostics. Note that
/// we consider a member function call to be a kind of access, even though
@@ -36,7 +36,7 @@ enum AccessKinds {
AK_Destroy,
};
-// The order of this enum is important for diagnostics.
+/// The order of this enum is important for diagnostics.
enum CheckSubobjectKind {
CSK_Base,
CSK_Derived,
@@ -72,7 +72,7 @@ class State {
public:
State() : InConstantContext(false) {}
- // Diagnose that the evaluation could not be folded (FF => FoldFailure)
+ /// Diagnose that the evaluation could not be folded (FF => FoldFailure)
OptionalDiagnostic
FFDiag(SourceLocation Loc,
diag::kind DiagId = diag::note_invalid_subexpr_in_const_expr,
More information about the cfe-commits
mailing list