This patch is itended to avoid suggesting typoed directives in .S files to support the cases of # directives treated as comments or various pseudo-ops. The feature is implemented in https://reviews.llvm.org/D124726. Fixes: https://reviews.llvm.org/D124726#3516346.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/test/Preprocessor/suggest-typoed-directive.S | ||
---|---|---|
2 | Consider adding a test: // RUN: %clang_cc1 -fsyntax-only -verify %s -x assembler-with-cpp < %s I don't think you need -S here or -o %t since there should be nothing produced from -fsyntax-only. |
clang/lib/Lex/PPDirectives.cpp | ||
---|---|---|
484 | Also, IIRC the token used to start a comment in assembler differs per architecture. This might be the simplest fix, for now. | |
clang/test/Preprocessor/suggest-typoed-directive.S | ||
2 | Sorry, I missed a - for "read from stdin": // RUN: %clang_cc1 -fsyntax-only -verify %s -x assembler-with-cpp - < %s |
clang/lib/Lex/PPDirectives.cpp | ||
---|---|---|
484 | Ah, I did not know that. Thank you! |
clang/test/Preprocessor/suggest-typoed-directive.S | ||
---|---|---|
2 | Sorry, I meant for you to have two run lines. One that specified -x assembler-with-cpp and one without. But I think -x assembler-with-cpp is not necessary, you should/can/may drop it. |
clang/test/Preprocessor/suggest-typoed-directive.S | ||
---|---|---|
2 | These three can be removed now as well. Clang will read %s as input without the need to read from stdin, which is what - < [filename] is doing. |
@nickdesaulniers
Thank you for your review!
I do not have permission to land this patch, so could you please do it on my behalf?
Here is my information:
Name: Ken Matsui
Email: vcs@kmatsui.me
I do not have permission to land this patch, so could you please do it on my behalf?
Will do.
Sorry, it looks like arcanist or my PHP runtime was auto updated on my host and has regressed. I need to sort that out first.
Also, IIRC the token used to start a comment in assembler differs per architecture. This might be the simplest fix, for now.