rsmith added inline comments.
Comment at: clang/include/clang/Parse/Parser.h:1873
+ ExprResult ParseInitializer(Decl *DeclForInitializer = nullptr) {
+Actions.ExprEvalContexts.back().DeclForInitializer = DeclForInitializer;
+ExprResult init;
This should
Nathan-Huckleberry marked 4 inline comments as done.
Nathan-Huckleberry added inline comments.
Comment at: clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:360
-constexpr int ok_byte = (__builtin_bit_cast(std::byte[8], pad{1, 2}), 0);
-constexpr int ok_uchar = (__builtin_bit_c
Nathan-Huckleberry updated this revision to Diff 215699.
Nathan-Huckleberry added a comment.
- Use ExprEvalContext and remove mangling context code
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63889/new/
https://reviews.llvm.org/D63889
Files:
c
rsmith added inline comments.
Comment at: clang/include/clang/Sema/Sema.h:1684-1686
+ void pushDeclForInitializer(Decl *D) { DeclForInitializer.push_back(D); }
+
+ void popDeclForInitializer() { DeclForInitializer.pop_back(); }
I don't think a simple list of th
Nathan-Huckleberry marked an inline comment as done.
Nathan-Huckleberry added inline comments.
Comment at: clang/lib/Sema/SemaDeclCXX.cpp:352
SetParamDefaultArgument(Param, DefaultArg, EqualLoc);
+ CurContext->removeDecl(Param);
+ CurContext = Cur;
rsmith wr
nickdesaulniers added inline comments.
Comment at: clang/lib/Sema/AnalysisBasedWarnings.cpp:2009
+AnalysisDeclContext &AC,
+SmallVector PUDs) {
+
is `clang` namespace required here?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
http
Nathan-Huckleberry updated this revision to Diff 211224.
Nathan-Huckleberry added a comment.
- Style fixes
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63889/new/
https://reviews.llvm.org/D63889
Files:
clang/include/clang/Parse/Parser.h
clang
Nathan-Huckleberry updated this revision to Diff 211221.
Nathan-Huckleberry added a comment.
- Style fixes
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63889/new/
https://reviews.llvm.org/D63889
Files:
clang/include/clang/Parse/Parser.h
clang
nickdesaulniers added inline comments.
Comment at: clang/include/clang/Sema/Sema.h:1698
+}
+return nullptr;
+ }
Does:
`return DeclForInitializer.empty() ? DeclForInitializer.back() : nullptr;`
fit on one line?
Comment at: clang/lib/Sem
nickdesaulniers added inline comments.
Comment at: clang/include/clang/Sema/Sema.h:1689
+ void popDeclForInitializer() {
+DeclForInitializer.pop_back();
+ }
might be nice to return the result, but maybe YAGNI?
Repository:
rG LLVM Github Monorepo
CHANGE
Nathan-Huckleberry updated this revision to Diff 211213.
Nathan-Huckleberry added a comment.
- Add tracking of declaration of initializers in Sema.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63889/new/
https://reviews.llvm.org/D63889
Files:
c
rsmith added inline comments.
Comment at: clang/lib/Sema/SemaDeclCXX.cpp:352
SetParamDefaultArgument(Param, DefaultArg, EqualLoc);
+ CurContext->removeDecl(Param);
+ CurContext = Cur;
We may need to delay the diagnostics here until the default argument is *u
Nathan-Huckleberry updated this revision to Diff 207925.
Nathan-Huckleberry added a comment.
- Stylistic fixes of function names and removal of namespace prefixes
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63889/new/
https://reviews.llvm.org/D63
nickdesaulniers added inline comments.
Comment at: clang/include/clang/Sema/AnalysisBasedWarnings.h:95
+ void flushDiagnostics(SmallVector);
+
Methods should be UpperCamelCased.
Comment at: clang/include/clang/Sema/AnalysisBasedWarnings.h:11
Nathan-Huckleberry updated this revision to Diff 207918.
Nathan-Huckleberry added a comment.
- Small functional and formatting changes
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63889/new/
https://reviews.llvm.org/D63889
Files:
clang/include/
Nathan-Huckleberry added inline comments.
Comment at: clang/lib/Analysis/AnalysisDeclContext.cpp:124
+if(VD->hasGlobalStorage()) {
+ return const_cast(dyn_cast(VD->getInit()));
+}
nickdesaulniers wrote:
> The `const_cast` doesn't look necessary here.
nickdesaulniers added inline comments.
Comment at: clang/include/clang/Sema/AnalysisBasedWarnings.h:101
+ void RegisterVarDeclWarning(VarDecl *VD, PossiblyUnreachableDiag
+ PossiblyUnreachableDiag);
+
`git-clang-format HEAD~`
The formal pa
pirama added inline comments.
Comment at: clang/include/clang/Sema/AnalysisBasedWarnings.h:111
+void emitPossiblyUnreachableDiags(Sema &S, AnalysisDeclContext &AC,
+SmallVector PossiblyUnreachableDiags);
+
Fix indentation.
Comment at: clang/lib
Nathan-Huckleberry created this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Create CFG for initializers and perform analysis based warnings on global
variables
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D63889
Files:
clang/include/cla
19 matches
Mail list logo