summaryrefslogtreecommitdiff
path: root/sax
AgeCommit message (Collapse)AuthorFilesLines
2014-10-15More -Werror,-Wunused-private-fieldStephan Bergmann1-3/+1
...detected with a modified trunk Clang with > Index: lib/Sema/SemaDeclCXX.cpp > =================================================================== > --- lib/Sema/SemaDeclCXX.cpp (revision 219190) > +++ lib/Sema/SemaDeclCXX.cpp (working copy) > @@ -1917,9 +1917,10 @@ > const Type *T = FD.getType()->getBaseElementTypeUnsafe(); > // FIXME: Destruction of ObjC lifetime types has side-effects. > if (const CXXRecordDecl *RD = T->getAsCXXRecordDecl()) > - return !RD->isCompleteDefinition() || > - !RD->hasTrivialDefaultConstructor() || > - !RD->hasTrivialDestructor(); > + return !RD->hasAttr<WarnUnusedAttr>() && > + (!RD->isCompleteDefinition() || > + !RD->hasTrivialDefaultConstructor() || > + !RD->hasTrivialDestructor()); > return false; > } > > @@ -3517,9 +3518,11 @@ > bool addFieldInitializer(CXXCtorInitializer *Init) { > AllToInit.push_back(Init); > > +#if 0 > // Check whether this initializer makes the field "used". > if (Init->getInit()->HasSideEffects(S.Context)) > S.UnusedPrivateFields.remove(Init->getAnyMember()); > +#endif > > return false; > } to warn about members of SAL_WARN_UNUSED-annotated class types, and warn about initializations with side effects (cf. <http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-October/039602.html> "-Wunused-private-field distracted by side effects"). Change-Id: I3f3181c4eb8180ca28e1fa3dffc9dbe1002c6628
2014-10-10Revert "This was OString already; use it that way"Stephan Bergmann1-4/+5
This reverts commit 9a25d12534f91c13400a63e265fb5aa14c6aca66, there's another use of DebugAttributes.find(rAttrName) in that function where rAttrName is of type OUString.
2014-10-10This was OString already; use it that wayMatúš Kukan1-5/+4
Change-Id: Ia2268ce8a1e2111adb609c515e5bfa824afa66ce
2014-10-02coverity#1158274 Uncaught exceptionCaolán McNamara1-10/+21
Change-Id: Icfbe30efa3ebd63620a900e345e4b4a74070b021
2014-10-02fix indentCaolán McNamara1-17/+17
Change-Id: Ife7b28fcb67051c41831ef9eb566c3a2c148033d
2014-10-02consistent capitalization in both exceptionsCaolán McNamara1-1/+1
Change-Id: I495a92c24847de265f04abb3670532270b5d6034
2014-10-02coverity#1242946 Unused valueCaolán McNamara1-1/+0
Change-Id: I5a5f0e96f8dc7443901ea7de568a21924137e139
2014-09-24Unused FastSaxSerializer::maSavedMarkStack memberMatúš Kukan1-1/+0
Change-Id: Ib665b3870f3d4b00c70d3f928452639464adca69
2014-09-22sax: Tabify makefiles to be more consistentMatúš Kukan4-29/+29
Change-Id: I4db1feea9db351917dd082bd22b9fc1cd5a6a9c0
2014-09-19Remove unused XFastTokenHandler functionsMatúš Kukan1-12/+0
Change-Id: I0d8072f1194aa837932dcffd6dc6a3761bbdc74e
2014-09-19Use FastSaxParser directlyMatúš Kukan2-8/+7
Change-Id: I2f21438a0ccc6bc096f3257c48e088c4114d9f45
2014-09-18fastparser: Use dummy token handler in unit test instead of an oox one.Matúš Kukan2-4/+37
Change-Id: I4562156858982857a17e8837106c4c946f175be7
2014-09-18Better to throw than crash, if token handler is not set.Matúš Kukan1-0/+3
Change-Id: If6b2d39b487b5f673d5b6b2945a6e7d08777594e
2014-08-30Use plain bool parameter hereMatúš Kukan1-9/+8
Change-Id: Ic948889a0fac32adc48a7a4fb1e7f82ce8b08ba4
2014-08-07Avoid incomplete type in fn sig to keep ubsan's RTTI-based checks happyStephan Bergmann3-12/+3
Change-Id: I2d4e4be562cc752e7545792b148d5ed0cf551f25
2014-07-11fdo#81214 - tolerate exceptions thrown inside XFastParser callbacks.Michael Meeks1-6/+5
Not an ideal solution; ideally we should not throw the exceptions, and stop the parser as soon as something bad like this happens; but hopefully exception throwing is reasonable exceptional. Change-Id: If619592533b2929c671e2b03eb8a83480bd92c54
2014-07-03FastSaxSerializer: update documentationMiklos Vajna1-4/+4
Change-Id: I5e374c426a4741a88d43848392fc83e2368dbf92
2014-07-03fdo#80748: Fix for file corruption due to framePrRohit Deshmukh1-1/+3
-For framePr Unit test is there in ooxmlexport.cxx -http://opengrok.libreoffice.org/xref/core/sw/qa/extras/ooxmlexport/ooxmlexport.cxx#3578 Change-Id: Ic1fd4c7a863d8ab57c6495e20bff6863eb941688 Reviewed-on: https://gerrit.libreoffice.org/10045 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-06-30Use a new fast parser instance for each XML fragment.Kohei Yoshida1-0/+3
Otherwise a crash ensues when the threaded XML parsing kicks in. Change-Id: Ic41e5a29bbb860d7b63b70f2f0d8896264d9d53e
2014-06-30Check for empty() before calling top().Kohei Yoshida1-0/+3
Else it might crash sometimes. Change-Id: I6a24fff83c3d36346debae5c0f2b8c0646a15c01
2014-06-30Don't go further and pop the stack if it's empty.Kohei Yoshida1-0/+6
Change-Id: I27bd30ca65cf0066cd022b4b060757913ea01fed
2014-06-13loplugin:staticcallStephan Bergmann1-2/+2
Change-Id: If21a079134f659a91f0b0ce400aef56bd095effe
2014-06-04DeInitVCL at end of testsStephan Bergmann1-0/+1
This required some changes to the framework: * Init-/DeInitVCL is no longer done per individual test in BootstrapFixture, but once per CppunitTest invocation in a new vclbootstrapprotector (similarly to the exisiting unobootstrapprotector). CppunitTests that need VCL now need to declare gb_CppunitTest_use_vcl. * For things to work properly, the UNO component context needs to be disposed from within DeInitVCL (cf. Desktop's Application::DeInit called from DeInitVCL). The easiest solution was to introduce an Application::setDeInitHook (where the hook is called from DeInitVCL) specifically for vclbootstrapprotector to call. * PythonTests don't (yet) call DeInitVCL; they still hook into BootstrapFixture's original test_init functionality (to call InitVCL), and do not make use of the vclbootstrapprotector. Change-Id: I4f3a3c75db30b58c1cd49d81c51db14902ed68b2
2014-06-02fdo#68849: Add header guards to all include filesJens Carl1-0/+6
added header guards for directories basebmp/, chart2/, cppuhelper/, include/test/, io/test/, sax/test, shell/, writerfilter/, and xmlhelp/ Change-Id: I0e29a9b75c26d71f58aa98986b52f6d3b46015a6 Reviewed-on: https://gerrit.libreoffice.org/9615 Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Tested-by: Thomas Arnhold <thomas@arnhold.org>
2014-06-01fdo#68849: Add header guards to all include filesJens Carl1-0/+5
Added header guards to files in directories sal/, sal/, and scripting/ Change-Id: Ieb7f224f2d27bd671618c516f47f5b7f08c1d294 Reviewed-on: https://gerrit.libreoffice.org/9582 Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Tested-by: Thomas Arnhold <thomas@arnhold.org>
2014-05-29remove more unnecesary OUString constructor useNoel Grandin1-4/+4
when throwing exceptions Change-Id: I6edfb6b6745499f802b0e3c0e096a36fb7c32aac
2014-05-27css already means ::com::sun::starThomas Arnhold1-1/+1
Change-Id: I48d7b746d7cc49246743c62480b0d225d2519342
2014-05-26coverity#982640 Missing break in switchCaolán McNamara1-0/+1
Change-Id: If2a14edafb72844061dcdd1ee3507d7a215220f1
2014-05-15Resolves fdo#70681: fixincludeguards.pl: all that's leftThomas Arnhold2-4/+4
Change-Id: I3e51a62710bb46c8255fd228d41d9300c90a1fb5 Reviewed-on: https://gerrit.libreoffice.org/9360 Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Tested-by: Thomas Arnhold <thomas@arnhold.org>
2014-05-14various loplugin:passsequencebyrefNoel Grandin1-2/+2
Change-Id: Id1045a7f66b4fa10b6491587ba07246a31ceba72
2014-05-14Find places where uno::Sequence is passed by value.Noel Grandin3-4/+4
Implement a clang plugin to find them, and clean up existing code to pass them by reference. Change-Id: If642d87407c73346d9c0164b9fc77c5c3c4354b8 Reviewed-on: https://gerrit.libreoffice.org/9351 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-05-10coverity#707979 Uninitialized pointer fieldCaolán McNamara1-0/+3
Change-Id: Id41ba6ab2c6f0a43f439c2b45d20d7d76a3cbe82
2014-04-24Avoid possible memory leaks in case of exceptionsTakeshi Abe2-20/+13
Change-Id: I047fd88a89900153089a55b6af123f11fb8bde55
2014-04-14typo: attribut -> attributeThomas Arnhold1-2/+2
2014-04-14typo: choosen -> chosenThomas Arnhold1-1/+1
2014-04-09Remove unused functionsStephan Bergmann3-7/+0
Change-Id: Iddf4e29005aaa510af00c7345487996b75f41c41
2014-04-07sax: sal_Bool->boolNoel Grandin5-113/+113
Change-Id: I8d9dd585c509fd4c1f09ee817d828f3e600e31d5
2014-04-01Explicitly mark overriding destructors as "virtual"Stephan Bergmann2-2/+2
It appears that the C++ standard allows overriding destructors to be marked "override," but at least some MSVC versions complain about it, so at least make sure such destructors are explicitly marked "virtual." Change-Id: I0e1cafa7584fd16ebdce61f569eae2373a71b0a1
2014-03-26First batch of adding SAL_OVERRRIDE to overriding function declarationsStephan Bergmann7-56/+56
...mostly done with a rewriting Clang plugin, with just some manual tweaking necessary to fix poor macro usage. Change-Id: I71fa20213e86be10de332ece0aa273239df7b61a
2014-03-18Find places where OUString and OString are passed by value.Noel Grandin2-3/+3
It's not very efficient, because we generally end up copying it twice - once into the parameter and again into the destination OUString. So I create a clang plugin that finds such places and generates a warning so that we can convert them to pass-by-reference. Change-Id: I5341a6ea9e3190f4b4c05c42c85595e3dcd83361
2014-03-05sax: FastAttributeList - add attribute in a specific namespaceTomaž Vajngerl1-0/+6
This change is inspired by startElementNS & singleElementNS which have namespace as first parameter to define the namespace of an element. Some attributes of a element can be in different namespace but until now FastAttributeList "add" method did not have a namespace parameter. This commit adds "addNS" which accepts namespace as a first parameter. Change-Id: Iebf8b5e890c17f00a56923efc3506580eed070a9
2014-03-02remove whitespacesMarkus Mohrhard1-31/+0
Change-Id: I624ca41c3e51ba785e359649c429feb61cc9a647
2014-02-26cppuhelper: retrofit std::exception into overriding exception specsStephan Bergmann6-100/+100
Change-Id: I56e32131b7991ee9948ce46765632eb823d463b3
2014-02-26Remove visual noise from saxAlexander Wilms6-14/+14
Change-Id: Ica31580f72b43456c33b2f6abbf2140a79efae1a Reviewed-on: https://gerrit.libreoffice.org/8299 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-25remove unused code sax_fastparser::FastSerializerHelper::copyTopMarkPop()Noel Grandin3-14/+0
Change-Id: If1dd0e99d83f8211c58fa3b5d1ba56a74bc2157f
2014-02-25remove unused code sax_fastparser::FastSerializerHelper::copyTopMarkPush()Noel Grandin3-12/+0
Change-Id: I4569e53f0423783bc5c9ee95b07d0de51b75b466
2014-02-23Remove unneccessary commentsAlexander Wilms5-39/+39
Change-Id: I939160ae72fecbe3d4a60ce755730bd4c38497fb Reviewed-on: https://gerrit.libreoffice.org/8182 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-21[API CHANGE] fix endCDATA to allow throwing css::xml::sax::SAXExceptionCaolán McNamara2-3/+3
coverity#1158397 Uncaught exception Change-Id: Iabf0b1f0500cb4218d8cb3aff372777471e8f287
2014-02-12Improve output in case of test failureStephan Bergmann1-2/+2
Change-Id: If094349998d41972f50e12363a5a223ee87fdcec
2014-02-11Related: #i97873# (coverity#705407) Improper use of negative valueCaolán McNamara1-1/+1
a pity the other one wasn't fixed when the first one was fixed back in 2002 with 0645e6a1a1917fef833358f328b5d56396380698 Change-Id: Ia7ac0f57a6805dc8ff09668198d0530b1cfc31db