[CXX-2767] Add macro guard tests to test for config macro leaks Created: 20/Oct/23  Updated: 26/Oct/23  Resolved: 26/Oct/23

Status: Closed
Project: C++ Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 3.9.0

Type: Bug Priority: Unknown
Reporter: Ezra Chung Assignee: Ezra Chung
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to CXX-2770 Add missing include of postlude heade... Backlog
is related to CXX-2769 Remove BSONCXX_ENUM in v_noabi macro ... Backlog

 Description   

"Config macros" defined in "config headers" under bsoncxx/config and mongocxx/config are expected to be guarded by prelude/postlude header files that ensure the macros do not conflict with any pre-existing macros, nor leak their definitions into user code. There are several public header files that do not include the postlude header despite including the prelude header, therefore leaking config macros into user code.



 Comments   
Comment by Githook User [ 26/Oct/23 ]

Author:

{'name': 'Ezra Chung', 'email': '88335979+eramongodb@users.noreply.github.com', 'username': 'eramongodb'}

Message: CXX-2767 Add macro guards tests for bsoncxx and mongocxx (#1043)

  • Use static library for catch/main.cpp
  • Add include/ and lib/ to target include directories
  • Add macro guard tests
  • Fix issues preventing standalone header inclusion
  • Fix missing prelude header include directives
  • Add macro guards tests to EVG config
  • Simplify and improve robustness of test library targets
  • CXX-2769 Document out-of-place BSONCXX_ENUM guards in macro guard headers
Generated at Wed Feb 07 22:06:57 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.