This revision was automatically updated to reflect the committed changes.
erikjv marked 3 inline comments as done.
Closed by commit rL304207: Allow for unfinished #if blocks in preambles
(authored by erikjv).
Changed prior to commit:
https://reviews.llvm.org/D15994?vs=98757=100691#toc
rsmith accepted this revision.
rsmith added a comment.
Some comments, but I'm happy for you to go ahead and commit after addressing
them. Thanks!
Comment at: include/clang/Lex/Preprocessor.h:2004
+ ArrayRef getPreambleConditionalStack() const
+ { return
nik added a comment.
Ping?!
https://reviews.llvm.org/D15994
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
erikjv updated this revision to Diff 98757.
https://reviews.llvm.org/D15994
Files:
include/clang/Lex/Preprocessor.h
include/clang/Lex/PreprocessorLexer.h
include/clang/Lex/PreprocessorOptions.h
include/clang/Serialization/ASTBitCodes.h
lib/Frontend/ASTUnit.cpp
lib/Lex/Lexer.cpp
erikjv marked 8 inline comments as done.
erikjv added a comment.
Fixed with the next patch.
https://reviews.llvm.org/D15994
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
arphaman added a comment.
Thanks for working on this! I have some comments below:
Comment at: include/clang/Lex/Preprocessor.h:291
+
+void setState(State s) { ConditionalStackState = s; }
+
`setState` is redundant IMHO, just assign to
erikjv updated this revision to Diff 87792.
https://reviews.llvm.org/D15994
Files:
include/clang/Lex/Preprocessor.h
include/clang/Lex/PreprocessorLexer.h
include/clang/Lex/PreprocessorOptions.h
include/clang/Serialization/ASTBitCodes.h
lib/Frontend/ASTUnit.cpp
lib/Lex/Lexer.cpp
rsmith added inline comments.
Comment at: include/clang/Lex/Preprocessor.h:310
+
+const Stack () const {
+ assert(ConditionalStack);
Return an `ArrayRef` rather than exposing the type of the storage (which is an
implementation detail), here and
erikjv updated this revision to Diff 80589.
https://reviews.llvm.org/D15994
Files:
include/clang/Lex/Preprocessor.h
include/clang/Lex/PreprocessorLexer.h
include/clang/Lex/PreprocessorOptions.h
include/clang/Serialization/ASTBitCodes.h
lib/Frontend/ASTUnit.cpp
lib/Lex/Lexer.cpp
erikjv marked 7 inline comments as done.
erikjv added inline comments.
Comment at: lib/Serialization/ASTReader.cpp:2816
+}
+PP.setReplayablePreambleConditionalStack(ConditionalStack);
+ }
rsmith wrote:
> Why can't we set the conditional
rsmith added inline comments.
Comment at: include/clang/Lex/Preprocessor.h:283-286
+ Off = 0,
+ Recording = 1,
+ Replaying = 2,
+ Done = 3
What's the difference between the `Off` and `Done` states? They seem to be the
same to me?
erikjv added a comment.
Yes, the patch was not committed, because there were errors in it. So, I fixed
it and put up a new version, but I have no idea how to reset the state.
Still waiting for rsmith to review...
https://reviews.llvm.org/D15994
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko added a comment.
Looks like patch was not committed.
https://reviews.llvm.org/D15994
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
erikjv updated the summary for this revision.
erikjv updated this revision to Diff 62748.
erikjv added a comment.
This version stores/loads the conditional stack in the preprocessor the the
generated pch file. It suppresses errors about unfinished conditional
preprocessor blocks, and after
erikjv abandoned this revision.
erikjv added a comment.
This will give errors about unbalanced #if/#endif for header guards.
http://reviews.llvm.org/D15994
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
erikjv created this revision.
erikjv added a reviewer: bkramer.
erikjv added a subscriber: cfe-commits.
Previously, a preamble only included #if blocks (and friends like
#ifdef) if there was a corresponding #endif before any declaration or
definition. The problem is that any header file that uses
16 matches
Mail list logo