This is an archive of the discontinued LLVM Phabricator instance.

PPCallbacks::MacroUndefined, change signature and add test.
ClosedPublic

Authored by marsupial on Feb 13 2017, 8:17 PM.

Details

Summary

The PPCallbacks::MacroUndefined callback is currently insufficient for clients that need to track the MacroDirectives.
This patch adds an additional argument to PPCallbacks::MacroUndefined that is the undef MacroDirective.

Diff Detail

Repository
rL LLVM

Event Timeline

marsupial created this revision.Feb 13 2017, 8:17 PM
bruno edited edge metadata.Feb 14 2017, 8:12 AM

Hi,

Can you attach the patch with context? What are you trying to fix by this change? Please also add a testcase.

I need notification that a macro has been undefined. It's equally as important as a when it was defined.
I'll happily make a test case but want to make sure this would get in before doing so.

marsupial updated this revision to Diff 88836.Feb 16 2017, 6:30 PM

Added test for un-definition callback.

marsupial edited the summary of this revision. (Show Details)Feb 17 2017, 11:48 AM
marsupial added a subscriber: cfe-commits.
manmanren edited edge metadata.Mar 9 2017, 10:44 AM

Please update the patch with context: http://llvm.org/docs/Phabricator.html#requesting-a-review-via-the-web-interface

Thanks,
Manman

unittests/Basic/SourceManagerTest.cpp
251 ↗(On Diff #88836)

Can we make this an enum?

marsupial updated this revision to Diff 91563.Mar 13 2017, 8:02 AM
marsupial retitled this revision from Send UndefMacroDirective to MacroDefined callback to Add test for PPCallbacks::MacroUndefined.
marsupial edited the summary of this revision. (Show Details)
marsupial marked an inline comment as done.
marsupial updated this revision to Diff 91627.Mar 13 2017, 3:01 PM
marsupial retitled this revision from Add test for PPCallbacks::MacroUndefined to PPCallbacks::MacroUndefined, change signature and add test..
marsupial edited the summary of this revision. (Show Details)
bruno accepted this revision.Mar 27 2017, 11:01 AM

LGTM!

This revision is now accepted and ready to land.Mar 27 2017, 11:01 AM
This revision was automatically updated to reflect the committed changes.