jdenny marked an inline comment as done.
jdenny added inline comments.

================
Comment at: clang/docs/ClangPlugins.rst:58
     ExamplePragmaHandler() : PragmaHandler("example_pragma") { }
-    void HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer,
+    void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer,
                       Token &PragmaTok) {
----------------
lebedev.ri wrote:
> Hmm.
> This will have effects on out-of-tree plugins that define pragmas.
> I'm not sure how to proceed here, just notify cfe-dev and move on?
We could do something like this in `PragmaHandler`:

```
  virtual void HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer,
                            Token &FirstToken) {
    llvm_unreachable("deprecated HandlePragma unexpectedly called");
  }
  virtual void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer,
                            Token &FirstToken) {
    HandlePragma(PP, Introducer.Kind, FirstToken);
  }
```

The derived class could override either one.  Unfortunately, if it didn't 
override either, the error is then at run time instead of compile time as it is 
now.

Whether this is worth it, I don't know.  Who's the right person to answer this 
question?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61643/new/

https://reviews.llvm.org/D61643



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to